summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-07-01 16:58:28 +0000
committerEric Andersen <andersen@codepoet.org>2002-07-01 16:58:28 +0000
commita8e5dc01e5e4b24bc3a6fb09ed579269ab682350 (patch)
tree54ac23b7c71457f6134ad86c81e7c77f4340d556 /libpthread/linuxthreads
parent6292928a6da63255f209d8bdf88d6896b4386de2 (diff)
Patch from Ronald Wahl <rwa@peppercon.com> -- kill references to
the obsolete PTHREAD_MUTEX_FAST_NP, and change the default mutex type to adaptive
Diffstat (limited to 'libpthread/linuxthreads')
-rw-r--r--libpthread/linuxthreads/mutex.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libpthread/linuxthreads/mutex.c b/libpthread/linuxthreads/mutex.c
index 4c582ea87..2123d00bc 100644
--- a/libpthread/linuxthreads/mutex.c
+++ b/libpthread/linuxthreads/mutex.c
@@ -32,7 +32,7 @@ int pthread_mutex_init(pthread_mutex_t * mutex,
{
__pthread_init_lock(&mutex->__m_lock);
mutex->__m_kind =
- mutex_attr == NULL ? PTHREAD_MUTEX_FAST_NP : mutex_attr->__mutexkind;
+ mutex_attr == NULL ? PTHREAD_MUTEX_ADAPTIVE_NP : mutex_attr->__mutexkind;
mutex->__m_count = 0;
mutex->__m_owner = NULL;
return 0;
@@ -52,7 +52,7 @@ int pthread_mutex_trylock(pthread_mutex_t * mutex)
int retcode;
switch(mutex->__m_kind) {
- case PTHREAD_MUTEX_FAST_NP:
+ case PTHREAD_MUTEX_ADAPTIVE_NP:
retcode = __pthread_trylock(&mutex->__m_lock);
return retcode;
case PTHREAD_MUTEX_RECURSIVE_NP:
@@ -84,7 +84,7 @@ int pthread_mutex_lock(pthread_mutex_t * mutex)
pthread_descr self;
switch(mutex->__m_kind) {
- case PTHREAD_MUTEX_FAST_NP:
+ case PTHREAD_MUTEX_ADAPTIVE_NP:
__pthread_lock(&mutex->__m_lock, NULL);
return 0;
case PTHREAD_MUTEX_RECURSIVE_NP:
@@ -112,7 +112,7 @@ int pthread_mutex_lock(pthread_mutex_t * mutex)
int pthread_mutex_unlock(pthread_mutex_t * mutex)
{
switch (mutex->__m_kind) {
- case PTHREAD_MUTEX_FAST_NP:
+ case PTHREAD_MUTEX_ADAPTIVE_NP:
__pthread_unlock(&mutex->__m_lock);
return 0;
case PTHREAD_MUTEX_RECURSIVE_NP:
@@ -137,7 +137,7 @@ int pthread_mutex_unlock(pthread_mutex_t * mutex)
int pthread_mutexattr_init(pthread_mutexattr_t *attr)
{
- attr->__mutexkind = PTHREAD_MUTEX_FAST_NP;
+ attr->__mutexkind = PTHREAD_MUTEX_ADAPTIVE_NP;
return 0;
}
//strong_alias (__pthread_mutexattr_init, pthread_mutexattr_init)
@@ -150,7 +150,7 @@ int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
int __pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind)
{
- if (kind != PTHREAD_MUTEX_FAST_NP
+ if (kind != PTHREAD_MUTEX_ADAPTIVE_NP
&& kind != PTHREAD_MUTEX_RECURSIVE_NP
&& kind != PTHREAD_MUTEX_ERRORCHECK_NP)
return EINVAL;