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 stage
pull/4119/head
Hasnain Virk 2017-05-10 12:09:36 +03:00
parent c65f81bf46
commit c8933e4c71
5 changed files with 2 additions and 14 deletions

View File

@ -178,7 +178,6 @@ bool BufferedSerial::hup() const
void BufferedSerial::wake() void BufferedSerial::wake()
{ {
_poll_change(this);
if (_sigio_cb) { if (_sigio_cb) {
_sigio_cb(); _sigio_cb();
} }

View File

@ -32,6 +32,7 @@ off_t FileHandle::size()
seek(off, SEEK_SET); seek(off, SEEK_SET);
return size; return size;
} }
std::FILE *fdopen(FileHandle *fh, const char *mode) std::FILE *fdopen(FileHandle *fh, const char *mode)
{ {
return mbed_fdopen(fh, mode); return mbed_fdopen(fh, mode);

View File

@ -181,8 +181,7 @@ public:
* The input parameter can be used or ignored - the could always return all events, * The input parameter can be used or ignored - the could always return all events,
* or could check just the events listed in events. * or could check just the events listed in events.
* Call is non-blocking - returns instantaneous state of events. * Call is non-blocking - returns instantaneous state of events.
* Whenever an event occurs, the derived class must call _poll_change() (as well as * Whenever an event occurs, the derived class should call the sigio() callback).
* the sigio() callback).
* *
* @param events bitmask of poll events we're interested in - POLLIN/POLLOUT etc. * @param events bitmask of poll events we're interested in - POLLIN/POLLOUT etc.
* *

View File

@ -72,9 +72,4 @@ int poll(pollfh fhs[], unsigned nfhs, int timeout)
return count; return count;
} }
void _poll_change(FileHandle *fh)
{
// TODO, will depend on how we implement poll
}
} // namespace mbed } // namespace mbed

View File

@ -49,12 +49,6 @@ struct pollfh {
*/ */
int poll(pollfh fhs[], unsigned nfhs, int timeout); 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 } // namespace mbed
#endif //MBED_POLL_H #endif //MBED_POLL_H