libs/libc/pthread, syscall/, and include/sys/syscall.h: Support for pthread_mutex_timedlock() was added recently, however no new system call was added for the API make is usable only in the FLAT build. With a pthread_mutex_timedlock() system call, there is no reason for a pthread_mutex_lock() system call since it is now nothing more than an wrapper around pthread_mutex_timedlock(), passing NULL for the time value. The pthread_mutex_lock() syscall was removed and the pthread_mutex_lock() implemented was moved from /sched/pthread to where it now belows in libs/libc/pthread.

This commit is contained in:
Gregory Nutt
2019-02-25 18:19:13 -06:00
parent 68f8161a45
commit 0951151c33
9 changed files with 124 additions and 72 deletions
+1 -1
View File
@@ -93,7 +93,7 @@
"pthread_kill","pthread.h","!defined(CONFIG_DISABLE_SIGNALS) && !defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","int"
"pthread_mutex_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t*"
"pthread_mutex_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t*","FAR const pthread_mutexattr_t*"
"pthread_mutex_lock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t*"
"pthread_mutex_timedlock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t*","FAR const struct timespec*"
"pthread_mutex_trylock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t*"
"pthread_mutex_unlock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t*"
"pthread_mutex_consistent","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && !defined(CONFIG_PTHREAD_MUTEX_UNSAFE)","int","FAR pthread_mutex_t*"
1 _exit unistd.h void int
93 pthread_kill pthread.h !defined(CONFIG_DISABLE_SIGNALS) && !defined(CONFIG_DISABLE_PTHREAD) int pthread_t
94 pthread_mutex_destroy pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_mutex_t*
95 pthread_mutex_init pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_mutex_t*
96 pthread_mutex_lock pthread_mutex_timedlock pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_mutex_t*
97 pthread_mutex_trylock pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_mutex_t*
98 pthread_mutex_unlock pthread.h !defined(CONFIG_DISABLE_PTHREAD) int FAR pthread_mutex_t*
99 pthread_mutex_consistent pthread.h !defined(CONFIG_DISABLE_PTHREAD) && !defined(CONFIG_PTHREAD_MUTEX_UNSAFE) int FAR pthread_mutex_t*