kernel/semaphore: add new APIs for priority inheritance
authorHeesub Shin <heesub.shin@samsung.com>
Thu, 6 Apr 2017 00:31:18 +0000 (09:31 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Tue, 18 Apr 2017 03:02:10 +0000 (12:02 +0900)
commiteb308b9a2ee32eb1b882baaa0ab78bab8446411b
tree43671c2592632f154164ea7908a0beba9eda5733
parent8537ac7030db4dc3d16689712b77f7c9bd730723
kernel/semaphore: add new APIs for priority inheritance

This commit introduces new APIs, pthread_mutexattr_get/set_protocol and
non-standard sem_get/set_protocol, which allow to enable or disable
priority inheritance on a single semaphore. Backported from NuttX. All
credits should go to Gregory Nutt who wrote the original patch.

Change-Id: I05c62a6a4ee6fbdb00b0478bf8ef8cfe44487f92
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 92d30224 from the upstream]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
18 files changed:
lib/libc/pthread/Make.defs
lib/libc/pthread/pthread_attrdestroy.c
lib/libc/pthread/pthread_mutexattr_getprotocol.c [new file with mode: 0644]
lib/libc/pthread/pthread_mutexattr_setprotocol.c [new file with mode: 0644]
lib/libc/pthread/pthread_mutexattrdestroy.c
lib/libc/semaphore/sem_init.c
os/include/pthread.h
os/include/semaphore.h
os/include/sys/syscall.h
os/include/tinyara/semaphore.h
os/kernel/pthread/pthread_mutexinit.c
os/kernel/semaphore/Make.defs
os/kernel/semaphore/sem_getprotocol.c [new file with mode: 0644]
os/kernel/semaphore/sem_holder.c
os/kernel/semaphore/sem_setprotocol.c [new file with mode: 0644]
os/syscall/syscall.csv
os/syscall/syscall_lookup.h
os/syscall/syscall_stublookup.c