summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-05 06:02:37 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-05 06:02:37 -0600
commit8b23716e9ace244a83f636cbafe6a51ed054af15 (patch)
treeba5f306422f74af62addd7ef3fb22a42756cb3bd
parent9b1e6e97b3ce140af2a05cd33be58b19237c1364 (diff)
downloadnuttx-8b23716e9ace244a83f636cbafe6a51ed054af15.tar.gz
nuttx-8b23716e9ace244a83f636cbafe6a51ed054af15.tar.bz2
nuttx-8b23716e9ace244a83f636cbafe6a51ed054af15.zip
Add definitions for SIGPOLL
-rw-r--r--nuttx/include/aio.h12
-rw-r--r--nuttx/include/signal.h9
-rw-r--r--nuttx/sched/Kconfig8
3 files changed, 26 insertions, 3 deletions
diff --git a/nuttx/include/aio.h b/nuttx/include/aio.h
index 449ce7959..61965789e 100644
--- a/nuttx/include/aio.h
+++ b/nuttx/include/aio.h
@@ -52,6 +52,12 @@
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
+/* These interfaces are not available to kernel code */
+
+#if (defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL)) && defined(__KERNEL__)
+# undef CONFIG_LIBC_AIO
+#endif
+
/* Work queue support is required. In the flat, embedded build the low-
* priority work queue is required so that the asynchronous I/O does not
* interfere with high priority driver operations. In the protected and
@@ -63,7 +69,7 @@
#ifdef CONFIG_LIBC_AIO
#ifndef CONFIG_SCHED_WORKQUEUE
-# error Asynchronous I/O requiresCONFIG_SCHED_WORKQUEUE
+# error Asynchronous I/O requires CONFIG_SCHED_WORKQUEUE
#else
# if defined (CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL)
# ifndef CONFIG_SCHED_USRWORK
@@ -163,7 +169,7 @@ int aio_suspend(FAR const struct aiocb *const list[], int nent,
FAR const struct timespec *timeout);
int aio_write(FAR struct aiocb *aiocbp);
-#ifndef CONFIG_PTHREAD_DISABLE
+#ifndef CONFIG_PTHREAD_DISABLE /* Depends on pthread support */
int lio_listio(int mode, FAR struct aiocb *const list[], int nent,
FAR struct sigevent *sig);
#endif
@@ -173,5 +179,5 @@ int lio_listio(int mode, FAR struct aiocb *const list[], int nent,
}
#endif
-#endif /* CONFIG_LIBC_AIO */
+#endif /* CONFIG_LIBC_AIO */
#endif /* __INCLUDE_AIO_H */
diff --git a/nuttx/include/signal.h b/nuttx/include/signal.h
index 271328da7..5d3c4654b 100644
--- a/nuttx/include/signal.h
+++ b/nuttx/include/signal.h
@@ -101,6 +101,15 @@
# endif
#endif
+#ifdef CONFIG_LIBC_AIO
+# ifndef CONFIG_SIG_POLL
+# define SIGPOLL 5 /* Sent when an asynchronous I/O event occurs */
+# else
+# define SIGPOLL CONFIG_SIG_POLL
+# endif
+#endif
+#endif
+
/* The following are non-standard signal definitions */
#ifndef CONFIG_DISABLE_PTHREAD
diff --git a/nuttx/sched/Kconfig b/nuttx/sched/Kconfig
index 96a424d20..4fe0ad762 100644
--- a/nuttx/sched/Kconfig
+++ b/nuttx/sched/Kconfig
@@ -767,6 +767,14 @@ config SIG_SIGCHLD
exits, is interrupted (stopped), or resumes after being interrupted.
Default: 4
+config SIG_POLL
+ int "SIGPOLL"
+ default 5
+ depends on LIBC_AIO
+ ---help---
+ The SIGPOLL signal is sent to a process when an asynchronous I/O
+ event occurs (meaning it has been polled). Default: 5
+
config SIG_SIGCONDTIMEDOUT
int "SIGCONDTIMEDOUT"
default 16