From: Heesub Shin Date: Thu, 6 Apr 2017 01:56:27 +0000 (+0900) Subject: fs: disable priority inheritance on all signaling semaphores X-Git-Tag: 1.1_Public_Release~614^2~108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c883f9bc520361ac891d7246bad97f117be6d7e5;p=rtos%2Ftinyara.git fs: disable priority inheritance on all signaling semaphores Disable priority inheritance on all semaphores used for signaling. Change-Id: I2d032767bff07012d7724a2228705dc125d42fd8 Signed-off-by: Gregory Nutt [Shin: backported dbbe46a2 from NuttX] Signed-off-by: Heesub Shin --- diff --git a/os/fs/vfs/fs_poll.c b/os/fs/vfs/fs_poll.c index d4740a7..dd4a903 100644 --- a/os/fs/vfs/fs_poll.c +++ b/os/fs/vfs/fs_poll.c @@ -66,6 +66,7 @@ #include #include #include +#include #include #ifdef CONFIG_NET_LWIP @@ -321,7 +322,13 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout) /* 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) {