incubator-nuttx/sched/semaphore
Jukka Laitinen 07d5bc2c50 sched/semaphore/sem_tickwait.c: Fix nxsem_tickwait_uninterruptible end condition
nxsem_tickwait correctly sleeps more than 1 tick. But nxsem_tickwait_uninterruptible
may wake up to a signal (with -EINTR), in which case the tick + 1 must also
be taken into account. Otherwise the nxsem_tickwait_uninterruptible may
wake up 1 tick too early.

Also fix the nxsem_tickwait to return with -ETIMEDOUT if called with delay 0.
This is similar to e.g.  posix sem_timedwait.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-30 19:23:01 +08:00
..
CMakeLists.txt sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
Make.defs sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_clockwait.c sched: change xx_timeout param from pid to tcb 2024-09-29 18:18:01 +08:00
sem_destroy.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_holder.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_initialize.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_post.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_protect.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_recover.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_reset.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_rw.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_setprotocol.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_tickwait.c sched/semaphore/sem_tickwait.c: Fix nxsem_tickwait_uninterruptible end condition 2024-09-30 19:23:01 +08:00
sem_timedwait.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_timeout.c sched: change xx_timeout param from pid to tcb 2024-09-29 18:18:01 +08:00
sem_trywait.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_wait.c sched: add nxsched_remove_self 2024-09-24 22:07:00 +08:00
sem_waitirq.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
semaphore.h sched: change xx_timeout param from pid to tcb 2024-09-29 18:18:01 +08:00