Skip to content

Commit c8933e4

Browse files
author
Hasnain Virk
committed
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
1 parent c65f81b commit c8933e4

File tree

5 files changed

+2
-14
lines changed

5 files changed

+2
-14
lines changed

platform/BufferedSerial.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ bool BufferedSerial::hup() const
178178

179179
void BufferedSerial::wake()
180180
{
181-
_poll_change(this);
182181
if (_sigio_cb) {
183182
_sigio_cb();
184183
}

platform/FileHandle.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ off_t FileHandle::size()
3232
seek(off, SEEK_SET);
3333
return size;
3434
}
35+
3536
std::FILE *fdopen(FileHandle *fh, const char *mode)
3637
{
3738
return mbed_fdopen(fh, mode);

platform/FileHandle.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ class FileHandle {
181181
* The input parameter can be used or ignored - the could always return all events,
182182
* or could check just the events listed in events.
183183
* Call is non-blocking - returns instantaneous state of events.
184-
* Whenever an event occurs, the derived class must call _poll_change() (as well as
185-
* the sigio() callback).
184+
* Whenever an event occurs, the derived class should call the sigio() callback).
186185
*
187186
* @param events bitmask of poll events we're interested in - POLLIN/POLLOUT etc.
188187
*

platform/mbed_poll.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,4 @@ int poll(pollfh fhs[], unsigned nfhs, int timeout)
7272
return count;
7373
}
7474

75-
void _poll_change(FileHandle *fh)
76-
{
77-
// TODO, will depend on how we implement poll
78-
}
79-
8075
} // namespace mbed

platform/mbed_poll.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ struct pollfh {
4949
*/
5050
int poll(pollfh fhs[], unsigned nfhs, int timeout);
5151

52-
/** To be called by device when poll state changes - must be called for poll() to work
53-
* This must be called in addition to the user-provided callback.
54-
*
55-
* @param fh A pointer to the file handle*/
56-
void _poll_change(FileHandle *fh);
57-
5852
} // namespace mbed
5953

6054
#endif //MBED_POLL_H

0 commit comments

Comments
 (0)