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
+1
View File
@@ -153,6 +153,7 @@
"task_setcancelstate","sched.h","","int","int","FAR int*"
"task_setcanceltype","sched.h","defined(CONFIG_CANCELLATION_POINTS)","int","int","FAR int*"
"task_testcancel","pthread.h","defined(CONFIG_CANCELLATION_POINTS)","void"
"tcdrain","termios.h","defined(CONFIG_SERIAL_TERMIOS)","int","int"
"telldir","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","off_t","FAR DIR*"
"timer_create","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","clockid_t","FAR struct sigevent*","FAR timer_t*"
"timer_delete","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t"
Can't render this file because it contains an unexpected character in line 150 and column 2.
+1
View File
@@ -72,6 +72,7 @@
#include <signal.h>
#include <mqueue.h>
#include <spawn.h>
#include <termios.h>
#include <assert.h>
/* Errno access is awkward. We need to generate get_errno() and set_errno()
+3
View File
@@ -211,6 +211,9 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
SYSCALL_LOOKUP(poll, 3, STUB_poll)
SYSCALL_LOOKUP(select, 5, STUB_select)
# endif
# ifndef CONFIG_SERIAL_TERMIOS
SYSCALL_LOOKUP(tcdrain, 1, STUB_tcdrain)
# endif
#endif
/* Board support */
+2
View File
@@ -210,6 +210,8 @@ uintptr_t STUB_aio_write(int nbr, uintptr_t parm1);
uintptr_t STUB_aio_fsync(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_aio_cancel(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_tcdrain(int nbr, uintptr_t parm1);
/* Board support */
uintptr_t STUB_boardctl(int nbr, uintptr_t parm1, uintptr_t parm2);