diff --git a/sched/mqueue/mq_rcvinternal.c b/sched/mqueue/mq_rcvinternal.c index 91701e5e07..459004c4ac 100644 --- a/sched/mqueue/mq_rcvinternal.c +++ b/sched/mqueue/mq_rcvinternal.c @@ -148,7 +148,7 @@ FAR struct mqueue_msg_s *mq_waitreceive(mqd_t mqdes) if (enter_cancellation_point()) { -#ifndef CONFIG_CANCELLATION_POINTS /* Not reachable in this case */ +#ifdef CONFIG_CANCELLATION_POINTS /* If there is a pending cancellation, then do not perform * the wait. Exit now with ECANCELED. */ diff --git a/sched/mqueue/mq_sndinternal.c b/sched/mqueue/mq_sndinternal.c index c59250683f..946c69275c 100644 --- a/sched/mqueue/mq_sndinternal.c +++ b/sched/mqueue/mq_sndinternal.c @@ -239,7 +239,7 @@ int mq_waitsend(mqd_t mqdes) if (enter_cancellation_point()) { -#ifndef CONFIG_CANCELLATION_POINTS /* Not reachable in this case */ +#ifdef CONFIG_CANCELLATION_POINTS /* If there is a pending cancellation, then do not perform * the wait. Exit now with ECANCELED. */ diff --git a/sched/semaphore/sem_wait.c b/sched/semaphore/sem_wait.c index 1aec3679d8..c51cdcb1f0 100644 --- a/sched/semaphore/sem_wait.c +++ b/sched/semaphore/sem_wait.c @@ -98,7 +98,7 @@ int sem_wait(FAR sem_t *sem) if (enter_cancellation_point()) { -#ifndef CONFIG_CANCELLATION_POINTS /* Not reachable in this case */ +#ifdef CONFIG_CANCELLATION_POINTS /* If there is a pending cancellation, then do not perform * the wait. Exit now with ECANCELED. */