ifdef out some non-reachable code
This commit is contained in:
parent
b52e4e5ecd
commit
842ec7e612
@ -148,6 +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 *.
|
||||
/* If there is a pending cancellation, then do not perform
|
||||
* the wait. Exit now with ECANCELED.
|
||||
*/
|
||||
@ -155,6 +156,7 @@ FAR struct mqueue_msg_s *mq_waitreceive(mqd_t mqdes)
|
||||
set_errno(ECANCELED);
|
||||
leave_cancellation_point();
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Get a pointer to the message queue */
|
||||
|
@ -239,6 +239,7 @@ int mq_waitsend(mqd_t mqdes)
|
||||
|
||||
if (enter_cancellation_point())
|
||||
{
|
||||
#ifndef CONFIG_CANCELLATION_POINTS /* Not reachable in this case *.
|
||||
/* If there is a pending cancellation, then do not perform
|
||||
* the wait. Exit now with ECANCELED.
|
||||
*/
|
||||
@ -246,6 +247,7 @@ int mq_waitsend(mqd_t mqdes)
|
||||
set_errno(ECANCELED);
|
||||
leave_cancellation_point();
|
||||
return ERROR;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Get a pointer to the message queue */
|
||||
|
@ -98,6 +98,7 @@ int sem_wait(FAR sem_t *sem)
|
||||
|
||||
if (enter_cancellation_point())
|
||||
{
|
||||
#ifndef CONFIG_CANCELLATION_POINTS /* Not reachable in this case *.
|
||||
/* If there is a pending cancellation, then do not perform
|
||||
* the wait. Exit now with ECANCELED.
|
||||
*/
|
||||
@ -106,6 +107,7 @@ int sem_wait(FAR sem_t *sem)
|
||||
leave_cancellation_point();
|
||||
leave_critical_section(flags);
|
||||
return ERROR;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Make sure we were supplied with a valid semaphore. */
|
||||
|
Loading…
Reference in New Issue
Block a user