drivers/serial/tcdrain: tcdrain() was recently added to the NuttX C library. But there is a problem. The specification of tcdrain() requires that it be a cancellation point. In order to do this, tcdrain was moved from the C library into the OS and the addition cancellation point hooks were added. In non-FLAT builds, access via system calls is also now supported.

This commit is contained in:
Gregory Nutt
2017-10-06 10:55:36 -06:00
parent 936df1bcb5
commit 5b04c25dcd
12 changed files with 61 additions and 43 deletions
+8 -2
View File
@@ -298,9 +298,15 @@
# ifndef CONFIG_DISABLE_POLL
# define SYS_poll __SYS_poll
# define SYS_select (__SYS_poll+1)
# define __SYS_boardctl (__SYS_poll+2)
# define __SYS_termios (__SYS_poll+2)
# else
# define __SYS_boardctl __SYS_poll
# define __SYS_termios __SYS_poll
# endif
# ifndef CONFIG_SERIAL_TERMIOS
# define SYS_tcdrain __SYS_termios
# define __SYS_boardctl (__SYS_termios+1)
# else
# define __SYS_boardctl __SYS_termios
# endif
#else
# define __SYS_boardctl __SYS_descriptors