Rtems_termios_ioctl problem
Arquer Stephane
stephane.arquer at stage.cnes.fr
Wed May 2 12:28:33 UTC 2007
Hi,
As I wrote in my previous email, I'm still trying to modify the file termios.c to add TCFLSH request like following:
case TCFLSH:
{
switch (args->buffer) {
case TCIFLUSH: /* flush input buffer */
{
unsigned int head;
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
/* buffer is not empty*/
head = tty->rawInBuf.Head;
tty->rawInBuf.Tail = head;
tty->rawInBuf.theBuf[head] = '\0';
sc = rtems_semaphore_release (tty->rawInBuf.Semaphore);
}
break;
I don't know if it is the correct way to flush the buffer. If someone knows how to do it,I'm interested.
Thanks for your help.
Stéphane.
More information about the users
mailing list