mirror of https://github.com/ARMmbed/mbed-os.git
Removing _poll_change() for now
There is currently no proper wake up mechanism provided by mbed-os. _poll_change() was supposed to wake upa blocking poll() in case of a POLL event but the implementation was dependent upon underlying wake up mechanism. In the absence of conditioanl variables or some other alternative, _poll_change() wasn't able to serve its purpose. Removing it for now. Should be implemented at some later stagepull/4119/head
parent
c65f81bf46
commit
c8933e4c71
|
@ -178,7 +178,6 @@ bool BufferedSerial::hup() const
|
|||
|
||||
void BufferedSerial::wake()
|
||||
{
|
||||
_poll_change(this);
|
||||
if (_sigio_cb) {
|
||||
_sigio_cb();
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ off_t FileHandle::size()
|
|||
seek(off, SEEK_SET);
|
||||
return size;
|
||||
}
|
||||
|
||||
std::FILE *fdopen(FileHandle *fh, const char *mode)
|
||||
{
|
||||
return mbed_fdopen(fh, mode);
|
||||
|
|
|
@ -181,8 +181,7 @@ public:
|
|||
* The input parameter can be used or ignored - the could always return all events,
|
||||
* or could check just the events listed in events.
|
||||
* Call is non-blocking - returns instantaneous state of events.
|
||||
* Whenever an event occurs, the derived class must call _poll_change() (as well as
|
||||
* the sigio() callback).
|
||||
* Whenever an event occurs, the derived class should call the sigio() callback).
|
||||
*
|
||||
* @param events bitmask of poll events we're interested in - POLLIN/POLLOUT etc.
|
||||
*
|
||||
|
|
|
@ -72,9 +72,4 @@ int poll(pollfh fhs[], unsigned nfhs, int timeout)
|
|||
return count;
|
||||
}
|
||||
|
||||
void _poll_change(FileHandle *fh)
|
||||
{
|
||||
// TODO, will depend on how we implement poll
|
||||
}
|
||||
|
||||
} // namespace mbed
|
||||
|
|
|
@ -49,12 +49,6 @@ struct pollfh {
|
|||
*/
|
||||
int poll(pollfh fhs[], unsigned nfhs, int timeout);
|
||||
|
||||
/** To be called by device when poll state changes - must be called for poll() to work
|
||||
* This must be called in addition to the user-provided callback.
|
||||
*
|
||||
* @param fh A pointer to the file handle*/
|
||||
void _poll_change(FileHandle *fh);
|
||||
|
||||
} // namespace mbed
|
||||
|
||||
#endif //MBED_POLL_H
|
||||
|
|
Loading…
Reference in New Issue