Re: tiny tty driver sample

2007-03-07 Thread Alan Cox
> > Unless data_size can be very large and high speed then you can replace the > > lot with > > > > if (tty_insert_flip_string(tty, data, data_size)) > > tty_flip_buffer_push(tty); > > > > What does "very large and high speed" mean in this context? The default behaviour is to ge

Re: tiny tty driver sample

2007-03-07 Thread H. Peter Anvin
Alan Cox wrote: I guess something like tty_buffer_request_room(tty, data_size); for (i = 0; i < data_size; ++i) work += tty_insert_flip_char(tty, data[i], TTY_NORMAL); if (work) tty_flip_buffer_push(tty); Unless data_size can be very lar

Re: tiny tty driver sample

2007-03-07 Thread Alan Cox
> I guess something like > > tty_buffer_request_room(tty, data_size); > for (i = 0; i < data_size; ++i) > work += tty_insert_flip_char(tty, data[i], TTY_NORMAL); > if (work) > tty_flip_buffer_push(tty); Unless data_size can be very large and high spe

Re: tiny tty driver sample

2007-03-07 Thread Jiri Slaby
Jon Ringle napsal(a): Hello, I'm trying to write a tty driver and I'm using http://lwn.net/images/pdf/LDD3/ch18.pdf as a guide. The sample tiny tty driver includes the following code: for (i = 0; i < data_size; ++i) { if (tty->flip.count >= TTY_FLIPBUF_SIZE)

Re: tiny tty driver sample

2007-03-07 Thread Jiri Kosina
On Wed, 7 Mar 2007, Jon Ringle wrote: > I'm trying to write a tty driver and I'm using > http://lwn.net/images/pdf/LDD3/ch18.pdf as a guide. The sample tiny tty > driver includes the following code: > for (i = 0; i < data_size; ++i) { > if (tty->flip.count >=

tiny tty driver sample

2007-03-07 Thread Jon Ringle
Hello, I'm trying to write a tty driver and I'm using http://lwn.net/images/pdf/LDD3/ch18.pdf as a guide. The sample tiny tty driver includes the following code: for (i = 0; i < data_size; ++i) { if (tty->flip.count >= TTY_FLIPBUF_SIZE)