zephyr/kernel/posix
Juan Manuel Torres Palma 342da7ac72 posix: semaphore: fix bugs and simplify code
Modifies several functions that are causing wrong
behaviour.

 * semaphore.h: add missing restrict keyword.
 * sem_destroy(): check that nobody is waiting
   before destroying the object.
 * sem_timedwait(): simpify function logic and
   fix a bug when abstime > currtime, that passed
   ticks instead of ms to k_sem_take().
 * sem_wait(): avoid unnecessary checks.
 * sem_init(): add pshared value assertion.

Signed-off-by: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com>
2018-03-21 14:27:47 -07:00
..
clock.c kernel: POSIX: Compatibility layer for POSIX clock APIs. 2018-02-21 19:17:28 -05:00
CMakeLists.txt kernel: Add posix API for semaphore 2018-03-05 20:51:36 -05:00
pthread.c kernel: pthread: correcting pthread_setschedparam. 2018-03-07 08:23:09 -05:00
pthread_barrier.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
pthread_common.c kernel: posix: separating posix APIs according to their types. 2017-12-20 14:59:04 -05:00
pthread_cond.c kernel: POSIX: Fixing return value of POSIX APIs on error. 2018-02-21 19:17:28 -05:00
pthread_mutex.c kernel: POSIX: Fixing return value of POSIX APIs on error. 2018-02-21 19:17:28 -05:00
pthread_rwlock.c kernel: POSIX: Compatibility layer for POSIX read-write lock APIs. 2018-03-05 19:27:37 -05:00
pthread_sched.c kernel: POSIX: Compatibility layer for scheduler APIs. 2018-02-21 19:17:28 -05:00
semaphore.c posix: semaphore: fix bugs and simplify code 2018-03-21 14:27:47 -07:00
timer.c kernel: POSIX: correcting time calculation in timer_gettime. 2018-03-07 08:23:09 -05:00