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
+2 -2
View File
@@ -2,7 +2,7 @@
* include/sys/syscall.h
* This file contains the system call numbers.
*
* Copyright (C) 2011-2018 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2019 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -432,7 +432,7 @@
# define SYS_pthread_key_delete (__SYS_pthread + 11)
# define SYS_pthread_mutex_destroy (__SYS_pthread + 12)
# define SYS_pthread_mutex_init (__SYS_pthread + 13)
# define SYS_pthread_mutex_lock (__SYS_pthread + 14)
# define SYS_pthread_mutex_timedlock (__SYS_pthread + 14)
# define SYS_pthread_mutex_trylock (__SYS_pthread + 15)
# define SYS_pthread_mutex_unlock (__SYS_pthread + 16)