Add POSIX fcntl to control blocking
Add the POSIX fcntl call, but only implementing F_SETFL and F_GETFL for O_NONBLOCK, so users can control the blocking flag of streams with only the integer file descriptor. Necessary to portably control the blockingness of the console: int flags = fcntl(STDOUT_FILENO, F_GETFL); fcntl(STDOUT_FILENO, F_SETFL, flags | O_NONBLOCK); |
---|
|
platform/mbed_retarget.cpp |
---|
platform/mbed_retarget.h |
---|