Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Functions | |
int | poll (pollfh fhs[], unsigned nfhs, int timeout) |
A mechanism to multiplex input/output over a set of file handles(file descriptors). |
Function Documentation
int poll | ( | pollfh | fhs[], |
unsigned | nfhs, | ||
int | timeout | ||
) |
A mechanism to multiplex input/output over a set of file handles(file descriptors).
For every file handle provided, poll() examines it for any events registered for that particular file handle.
- Parameters:
-
fhs an array of PollFh struct carrying a FileHandle and bitmasks of events nfhs number of file handles timeout timer value to timeout or -1 for loop forever
- Returns:
- number of file handles selected (for which revents is non-zero). 0 if timed out with nothing selected. -1 for error.
TODO Proper wake-up mechanism. In order to correctly detect availability of read/write a FileHandle, we needed a select or poll mechanisms. We opted for poll as POSIX defines in http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html Currently, mbed::poll() just spins and scans filehandles looking for any events we are interested in. In future, his spinning behaviour will be replaced with condition variables.
TODO Proper wake-up mechanism. In order to correctly detect availability of read/write a FileHandle, we needed a select or poll mechanisms. We opted for poll as POSIX defines in http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html Currently, mbed::poll() just spins and scans filehandles looking for any events we are interested in. In future, his spinning behaviour will be replaced with condition variables.
Definition at line 26 of file mbed_poll_stub.cpp.
Generated on Tue Jul 12 2022 14:26:25 by
