OSDN Git Service

Oops... don't need recursive mutexes.
authorManuel Novoa III <mjn3@codepoet.org>
Thu, 6 Nov 2003 21:13:03 +0000 (21:13 -0000)
committerManuel Novoa III <mjn3@codepoet.org>
Thu, 6 Nov 2003 21:13:03 +0000 (21:13 -0000)
libc/pwd_grp/pwd_grp.c

index da8893e..a489014 100644 (file)
@@ -444,7 +444,7 @@ int getpw(uid_t uid, char *buf)
 #ifdef L_getpwent_r
 
 #ifdef __UCLIBC_HAS_THREADS__
-static pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER;
 # define LOCK          pthread_mutex_lock(&mylock)
 # define UNLOCK                pthread_mutex_unlock(&mylock);
 #else       
@@ -508,7 +508,7 @@ int getpwent_r(struct passwd *__restrict resultbuf,
 #ifdef L_getgrent_r
 
 #ifdef __UCLIBC_HAS_THREADS__
-static pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER;
 # define LOCK          pthread_mutex_lock(&mylock)
 # define UNLOCK                pthread_mutex_unlock(&mylock);
 #else       
@@ -571,7 +571,7 @@ int getgrent_r(struct group *__restrict resultbuf,
 #ifdef L_getspent_r
 
 #ifdef __UCLIBC_HAS_THREADS__
-static pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+static pthread_mutex_t mylock =  PTHREAD_MUTEX_INITIALIZER;
 # define LOCK          pthread_mutex_lock(&mylock)
 # define UNLOCK                pthread_mutex_unlock(&mylock);
 #else