Browse Source

Oops... don't need recursive mutexes.

Manuel Novoa III 20 years ago
parent
commit
c79d5f8bb2
1 changed files with 3 additions and 3 deletions
  1. 3 3
      libc/pwd_grp/pwd_grp.c

+ 3 - 3
libc/pwd_grp/pwd_grp.c

@@ -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