Lines Matching refs:buffer
31 * Returns the free space inside the ring buffer of this line.
39 if (line->buffer == NULL)
42 /* This is for the case where the buffer is wrapped! */
78 * This copies the content of buf into the circular buffer associated with
82 * the circular buffer.
90 if (line->buffer == NULL) {
91 line->buffer = kmalloc(LINE_BUFSIZE, GFP_ATOMIC);
92 if (line->buffer == NULL) {
97 line->head = line->buffer;
98 line->tail = line->buffer;
104 end = line->buffer + LINE_BUFSIZE - line->tail;
111 /* The circular buffer is wrapping */
114 memcpy(line->buffer, buf, len - end);
115 line->tail = line->buffer + len - end;
122 * Flushes the ring buffer to the output channels. That is, write_chan is
123 * called, passing it line->head as buffer, and an appropriate count.
125 * On exit, returns 1 when the buffer is empty,
126 * 0 when the buffer is not empty on exit,
134 if ((line->buffer == NULL) || (line->head == line->tail))
138 /* line->buffer + LINE_BUFSIZE is the end of the buffer! */
139 count = line->buffer + LINE_BUFSIZE - line->head;
147 * We have flushed from ->head to buffer end, now we
150 line->head = line->buffer;
252 line->head = line->buffer;
253 line->tail = line->buffer;
748 printk(KERN_ERR "Failed to allocate buffer for xterm title\n");