[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Howto cancel a blocked termios read request
- Date: Tue, 08 May 2007 08:35:35 +0200
- From: Wolfram.Wadepohl at ek-automation.com (Wolfram Wadepohl)
- Subject: Howto cancel a blocked termios read request
i need to cancel a blocked termios read request.
the request blocks at the tty->rawInBuf.Semaphore in fillBufferQueue():
...
/*
* Wait for characters
*/
if ( wait ) {
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
break;
}
...
using ioctl to set c_cc[VMIN] = c_cc[VTIME] = 0 does not help, because it
changes only tty->rawInBufSemaphoreOptions, which will be in effect for the
*next* call to rtems_semaphore_obtain().
should we put an extra rtems_semaphore_release() call in the code, when we
set tty->rawInBufSemaphoreOptions to RTEMS_NO_WAIT (line 571) in case of
c_cc[VMIN] = c_cc[VTIME] = 0?
any other suggestions to cancel a blocked read?
thanks.
--
Sch?ne Gr??e aus Reutlingen
Wolfram Wadepohl
Forschung & Entwicklung
E&K AUTOMATION
Indumat GmbH & Co. KG
Siemensstra?e 3
72766 Reutlingen
Deutschland
Tel. +49 7121 514-289
Fax +49 7121 514-299
eMail Wolfram.Wadepohl at ek-automation.com
W.Wadepohl at ieee.org
WWW http://www.ek-automation.com
http://www.indumat.de
Diese Nachricht ist keine gesch?ftliche Mitteilung i. S. des EHUG.
Bitte senden Sie mir keine Word- oder PowerPoint- (tm Microsoft) Anh?nge.
Senden Sie mir einfachen Text, HTML oder PDF.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3210 bytes
Desc: S/MIME Cryptographic Signature
Url : http://rtems.rtems.org/pipermail/rtems-users/attachments/20070508/2c1ead8c/attachment.bin