test, and set or clear, events that are pending on a terminal device
#include <sys/dev.h> unsigned dev_state( int fd, unsigned bits, unsigned mask );
The dev_state() function is used to test and set (or clear) the state of the current events that are pending on the terminal device associated with fd.
Any event bits that are set in mask are set to the corresponding bit in bits. The value of the event state before this operation is applied is returned. For a description of the events, see dev_arm().
The current state of the terminal device associated with fd. If an error occurs, -1 is returned and errno is set.
See dev_arm().
QNX
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | Yes, but modifies errno |
Thread | Yes |