diff options
Diffstat (limited to 'nuttx/sched')
-rw-r--r-- | nuttx/sched/Makefile | 10 | ||||
-rw-r--r-- | nuttx/sched/sem_holder.c | 13 | ||||
-rw-r--r-- | nuttx/sched/sem_internal.h | 4 |
3 files changed, 20 insertions, 7 deletions
diff --git a/nuttx/sched/Makefile b/nuttx/sched/Makefile index b11511b65..31e09f2aa 100644 --- a/nuttx/sched/Makefile +++ b/nuttx/sched/Makefile @@ -89,7 +89,10 @@ MQUEUE_SRCS = mq_open.c mq_close.c mq_unlink.c \ mq_send.c mq_timedsend.c mq_sndinternal.c \ mq_receive.c mq_timedreceive.c mq_rcvinternal.c \ mq_setattr.c mq_getattr.c mq_initialize.c mq_descreate.c \ - mq_findnamed.c mq_msgfree.c mq_msgqfree.c mq_waitirq.c + mq_findnamed.c mq_msgfree.c mq_msgqfree.c +ifneq ($(CONFIG_DISABLE_SIGNALS),y) +MQUEUE_SRCS += mq_waitirq.c +endif ifneq ($(CONFIG_DISABLE_SIGNALS),y) MQUEUE_SRCS += mq_notify.c endif @@ -125,7 +128,10 @@ endif SEM_SRCS = sem_initialize.c sem_init.c sem_destroy.c\ sem_open.c sem_close.c sem_unlink.c \ sem_wait.c sem_trywait.c sem_post.c sem_getvalue.c \ - sem_waitirq.c sem_findnamed.c + sem_findnamed.c +ifneq ($(CONFIG_DISABLE_SIGNALS),y) +SEM_SRCS += sem_waitirq.c +endif ifeq ($(CONFIG_PRIORITY_INHERITANCE),y) SEM_SRCS += sem_holder.c endif diff --git a/nuttx/sched/sem_holder.c b/nuttx/sched/sem_holder.c index 1c3126f2d..28d74a868 100644 --- a/nuttx/sched/sem_holder.c +++ b/nuttx/sched/sem_holder.c @@ -734,13 +734,14 @@ void sem_releaseholder(FAR sem_t *sem) * stcb - The TCB of the task that was just started (if any). If the * post action caused a count to be given to another thread, then stcb * is the TCB that received the count. Note, just because stcb received - * the count, it does not mean that it it is higher priority than other threads. + * the count, it does not mean that it it is higher priority than other + * threads. * sem - A reference to the semaphore being posted. * - If the semaphore count is <0 then there are still threads waiting - * for a count. stcb should be non-null and will be higher priority than - * all of the other threads still waiting. - * - If it is ==0 then stcb refers to the thread that got the last count; no - * other threads are waiting. + * for a count. stcb should be non-null and will be higher priority + * than all of the other threads still waiting. + * - If it is ==0 then stcb refers to the thread that got the last count; + * no other threads are waiting. * - If it is >0 then there should be no threads waiting for counts and * stcb should be null. * @@ -831,6 +832,7 @@ void sem_restorebaseprio(FAR _TCB *stcb, FAR sem_t *sem) * ****************************************************************************/ +#ifndef CONFIG_DISABLE_SIGNALS void sem_canceled(FAR _TCB *stcb, FAR sem_t *sem) { /* Check our assumptions */ @@ -841,6 +843,7 @@ void sem_canceled(FAR _TCB *stcb, FAR sem_t *sem) (void)sem_foreachholder(sem, sem_restoreholderprio, stcb); } +#endif /**************************************************************************** * Function: sem_enumholders diff --git a/nuttx/sched/sem_internal.h b/nuttx/sched/sem_internal.h index 4b3d30fb1..cbb7e96dd 100644 --- a/nuttx/sched/sem_internal.h +++ b/nuttx/sched/sem_internal.h @@ -100,7 +100,11 @@ EXTERN void sem_addholder(FAR sem_t *sem); EXTERN void sem_boostpriority(FAR sem_t *sem); EXTERN void sem_releaseholder(FAR sem_t *sem); EXTERN void sem_restorebaseprio(FAR _TCB *stcb, FAR sem_t *sem); +# ifndef CONFIG_DISABLE_SIGNALS EXTERN void sem_canceled(FAR _TCB *stcb, FAR sem_t *sem); +# else +# define sem_canceled(stcb, sem) +# endif #else # define sem_initholders() # define sem_destroyholder(sem) |