fs: Disable priority inheritance on all semaphores used for signaling

This commit is contained in:
Gregory Nutt 2016-11-03 12:23:31 -06:00
parent 2d057c28c8
commit dbbe46a2bc

View File

@ -47,9 +47,9 @@
#include <errno.h>
#include <nuttx/clock.h>
#include <nuttx/semaphore.h>
#include <nuttx/fs/fs.h>
#include <nuttx/net/net.h>
#include <nuttx/semaphore.h>
#include <arch/irq.h>
@ -365,7 +365,13 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout)
int errcode;
int ret;
/* 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)
{