diff --git a/sched/sem_wait.c b/sched/sem_wait.c index 8734dc1f7c..cbf8fd0192 100644 --- a/sched/sem_wait.c +++ b/sched/sem_wait.c @@ -164,9 +164,13 @@ int sem_wait(sem_t *sem) */ if (*get_errno_ptr() != EINTR) - ret = OK; + { + ret = OK; + } else - sem->semcount++; + { + sem->semcount++; + } } /* Interrupts may now be enabled. */ diff --git a/sched/sig_received.c b/sched/sig_received.c index 9df9e797cb..7a5e2e7490 100644 --- a/sched/sig_received.c +++ b/sched/sig_received.c @@ -296,6 +296,7 @@ int sig_received(FAR _TCB *stcb, siginfo_t *info) ret = OK; /****** MASKED SIGNAL HANDLING ******/ + /* Check if the signal is masked -- if it is, it will be added to the * list of pending signals. */ @@ -365,6 +366,7 @@ int sig_received(FAR _TCB *stcb, siginfo_t *info) } /****** OTHER SIGNAL HANDLING ******/ + /* If the task is blocked waiting for a semaphore, then that * task must be unblocked when a signal is received. */