Add pthread_mutexattr_get/set_protocol and non-standard sem_get/set_protocol. These may use to enable or disable priority inheritance on a single semaphore.

This commit is contained in:
Gregory Nutt
2016-11-02 09:05:18 -06:00
parent 14e06a3ce3
commit 92d3022411
18 changed files with 465 additions and 51 deletions
+2
View File
@@ -117,7 +117,9 @@
"sem_close","semaphore.h","defined(CONFIG_FS_NAMED_SEMAPHORES)","int","FAR sem_t*"
"sem_destroy","semaphore.h","","int","FAR sem_t*"
"sem_open","semaphore.h","defined(CONFIG_FS_NAMED_SEMAPHORES)","FAR sem_t*","FAR const char*","int","..."
"sem_getprotocol","semaphore.h","defined(CONFIG_PRIORITY_INHERITANCE)","int","FAR sem_t*","FAR int*"
"sem_post","semaphore.h","","int","FAR sem_t*"
"sem_setprotocol","semaphore.h","defined(CONFIG_PRIORITY_INHERITANCE)","int","FAR sem_t*","int"
"sem_timedwait","semaphore.h","","int","FAR sem_t*","FAR const struct timespec *"
"sem_trywait","semaphore.h","","int","FAR sem_t*"
"sem_unlink","semaphore.h","defined(CONFIG_FS_NAMED_SEMAPHORES)","int","FAR const char*"
1 _exit unistd.h void int
117 sem_close semaphore.h defined(CONFIG_FS_NAMED_SEMAPHORES) int FAR sem_t*
118 sem_destroy semaphore.h int FAR sem_t*
119 sem_open semaphore.h defined(CONFIG_FS_NAMED_SEMAPHORES) FAR sem_t* FAR const char*
120 sem_getprotocol semaphore.h defined(CONFIG_PRIORITY_INHERITANCE) int FAR sem_t*
121 sem_post semaphore.h int FAR sem_t*
122 sem_setprotocol semaphore.h defined(CONFIG_PRIORITY_INHERITANCE) int FAR sem_t*
123 sem_timedwait semaphore.h int FAR sem_t*
124 sem_trywait semaphore.h int FAR sem_t*
125 sem_unlink semaphore.h defined(CONFIG_FS_NAMED_SEMAPHORES) int FAR const char*
+6 -1
View File
@@ -61,12 +61,17 @@ SYSCALL_LOOKUP(uname, 1, STUB_uname)
/* Semaphores */
SYSCALL_LOOKUP(sem_destroy, 2, STUB_sem_destroy)
SYSCALL_LOOKUP(sem_destroy, 1, STUB_sem_destroy)
SYSCALL_LOOKUP(sem_post, 1, STUB_sem_post)
SYSCALL_LOOKUP(sem_timedwait, 2, STUB_sem_timedwait)
SYSCALL_LOOKUP(sem_trywait, 1, STUB_sem_trywait)
SYSCALL_LOOKUP(sem_wait, 1, STUB_sem_wait)
#ifdef CONFIG_PRIORITY_INHERITANCE
SYSCALL_LOOKUP(sem_getprotocol, 2, STUB_sem_getprotocol)
SYSCALL_LOOKUP(sem_setprotocol, 2, STUB_sem_setprotocol)
#endif
/* Named semaphores */
#ifdef CONFIG_FS_NAMED_SEMAPHORES
+3
View File
@@ -82,13 +82,16 @@ uintptr_t STUB_uname(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_close(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_destroy(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_getprotocol(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_sem_open(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5, uintptr_t parm6);
uintptr_t STUB_sem_post(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_setprotocol(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_sem_timedwait(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_sem_trywait(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_unlink(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_wait(int nbr, uintptr_t parm1);
uintptr_t STUB_pgalloc(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_task_create(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);