Minor cleanup from recent changes.

This commit is contained in:
Gregory Nutt
2017-03-26 14:04:07 -06:00
parent 5a69453e16
commit 34c5e1c18f
7 changed files with 10 additions and 16 deletions
+2 -2
View File
@@ -109,8 +109,8 @@ FAR struct join_s *pthread_findjoininfo(FAR struct task_group_s *group,
void pthread_release(FAR struct task_group_s *group);
int pthread_takesemaphore(sem_t *sem, bool intr);
int pthread_givesemaphore(sem_t *sem);
int pthread_takemutex(FAR struct pthread_mutex_s *mutex, bool intr);
int pthread_givemutex(FAR struct pthread_mutex_s *mutex);
int pthread_mutex_take(FAR struct pthread_mutex_s *mutex, bool intr);
int pthread_mutex_give(FAR struct pthread_mutex_s *mutex);
void pthread_mutex_inconsistent(FAR struct pthread_tcb_s *tcb);
#ifdef CONFIG_MUTEX_TYPES
+2 -2
View File
@@ -260,7 +260,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex,
/* Give up the mutex */
mutex->pid = -1;
ret = pthread_givemutex(mutex);
ret = pthread_mutex_give(mutex);
if (ret != 0)
{
/* Restore interrupts (pre-emption will be enabled when
@@ -316,7 +316,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex,
/* Reacquire the mutex (retaining the ret). */
sinfo("Re-locking...\n");
status = pthread_takemutex(mutex, false);
status = pthread_mutex_take(mutex, false);
if (status == OK)
{
mutex->pid = mypid;
+2 -2
View File
@@ -101,7 +101,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex)
sched_lock();
mutex->pid = -1;
ret = pthread_givemutex(mutex);
ret = pthread_mutex_give(mutex);
/* Take the semaphore */
@@ -122,7 +122,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex)
*/
sinfo("Reacquire mutex...\n");
status = pthread_takemutex(mutex, false);
status = pthread_mutex_take(mutex, false);
if (ret == OK)
{
/* Report the first failure that occurs */
+1 -1
View File
@@ -185,7 +185,7 @@ int pthread_mutex_lock(FAR pthread_mutex_t *mutex)
{
/* Take the underlying semaphore, waiting if necessary */
ret = pthread_takemutex(mutex, true);
ret = pthread_mutex_take(mutex, true);
/* If we successfully obtained the semaphore, then indicate
* that we own it.
+1 -1
View File
@@ -139,7 +139,7 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex)
#ifdef CONFIG_MUTEX_TYPES
mutex->nlocks = 0;
#endif
ret = pthread_givemutex(mutex);
ret = pthread_mutex_give(mutex);
}
sched_unlock();