#include <tinyara/sched.h>
#include <tinyara/clock.h>
#include <tinyara/cancelpt.h>
+#include <tinyara/semaphore.h>
#include <tinyara/fs/fs.h>
#ifdef CONFIG_NET_LWIP
/* poll() is a cancellation point */
(void)enter_cancellation_point();
+ /*
+ * This semaphore is used for signaling and, hence, should not have
+ * priority inheritance enabled.
+ */
sem_init(&sem, 0, 0);
+ sem_setprotocol(&sem, SEM_PRIO_NONE);
+
ret = poll_setup(fds, nfds, &sem);
if (ret >= 0) {
if (timeout == 0) {