Remove intr
param from pthread_mutex_take
This commit is contained in:
parent
4cc7f3747c
commit
7ee8d38fda
@ -96,12 +96,12 @@ int pthread_sem_give(sem_t *sem);
|
||||
|
||||
#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE
|
||||
int pthread_mutex_take(FAR struct pthread_mutex_s *mutex,
|
||||
FAR const struct timespec *abs_timeout, bool intr);
|
||||
FAR const struct timespec *abs_timeout);
|
||||
int pthread_mutex_trytake(FAR struct pthread_mutex_s *mutex);
|
||||
int pthread_mutex_give(FAR struct pthread_mutex_s *mutex);
|
||||
void pthread_mutex_inconsistent(FAR struct tcb_s *tcb);
|
||||
#else
|
||||
# define pthread_mutex_take(m,abs_timeout,i) pthread_sem_take(&(m)->sem,(abs_timeout))
|
||||
# define pthread_mutex_take(m,abs_timeout) pthread_sem_take(&(m)->sem,(abs_timeout))
|
||||
# define pthread_mutex_trytake(m) pthread_sem_trytake(&(m)->sem)
|
||||
# define pthread_mutex_give(m) pthread_sem_give(&(m)->sem)
|
||||
#endif
|
||||
|
@ -159,7 +159,7 @@ int pthread_cond_clockwait(FAR pthread_cond_t *cond,
|
||||
|
||||
sinfo("Re-locking...\n");
|
||||
|
||||
status = pthread_mutex_take(mutex, NULL, false);
|
||||
status = pthread_mutex_take(mutex, NULL);
|
||||
if (status == OK)
|
||||
{
|
||||
mutex->pid = mypid;
|
||||
|
@ -126,7 +126,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex)
|
||||
|
||||
sinfo("Reacquire mutex...\n");
|
||||
|
||||
status = pthread_mutex_take(mutex, NULL, false);
|
||||
status = pthread_mutex_take(mutex, NULL);
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Report the first failure that occurs */
|
||||
|
@ -132,8 +132,6 @@ static void pthread_mutex_remove(FAR struct pthread_mutex_s *mutex)
|
||||
*
|
||||
* Input Parameters:
|
||||
* mutex - The mutex to be locked
|
||||
* intr - false: ignore EINTR errors when locking; true treat EINTR as
|
||||
* other errors by returning the errno value
|
||||
*
|
||||
* Returned Value:
|
||||
* 0 on success or an errno value on failure.
|
||||
@ -141,7 +139,7 @@ static void pthread_mutex_remove(FAR struct pthread_mutex_s *mutex)
|
||||
****************************************************************************/
|
||||
|
||||
int pthread_mutex_take(FAR struct pthread_mutex_s *mutex,
|
||||
FAR const struct timespec *abs_timeout, bool intr)
|
||||
FAR const struct timespec *abs_timeout)
|
||||
{
|
||||
int ret = EINVAL;
|
||||
|
||||
|
@ -187,7 +187,7 @@ int pthread_mutex_timedlock(FAR pthread_mutex_t *mutex,
|
||||
* or default mutex.
|
||||
*/
|
||||
|
||||
ret = pthread_mutex_take(mutex, abs_timeout, false);
|
||||
ret = pthread_mutex_take(mutex, abs_timeout);
|
||||
|
||||
/* If we successfully obtained the semaphore, then indicate
|
||||
* that we own it.
|
||||
|
Loading…
Reference in New Issue
Block a user