svn commit: r317897 - stable/11/lib/libc/gen

Konstantin Belousov kib at FreeBSD.org
Sun May 7 07:56:00 UTC 2017


Author: kib
Date: Sun May  7 07:55:58 2017
New Revision: 317897
URL: https://svnweb.freebsd.org/changeset/base/317897

Log:
  MFC r317611:
  Make semaphore names list mutex non-recursive.

Modified:
  stable/11/lib/libc/gen/sem_new.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/gen/sem_new.c
==============================================================================
--- stable/11/lib/libc/gen/sem_new.c	Sun May  7 07:54:21 2017	(r317896)
+++ stable/11/lib/libc/gen/sem_new.c	Sun May  7 07:55:58 2017	(r317897)
@@ -104,12 +104,8 @@ sem_child_postfork(void)
 static void
 sem_module_init(void)
 {
-	pthread_mutexattr_t ma;
 
-	_pthread_mutexattr_init(&ma);
-	_pthread_mutexattr_settype(&ma,  PTHREAD_MUTEX_RECURSIVE);
-	_pthread_mutex_init(&sem_llock, &ma);
-	_pthread_mutexattr_destroy(&ma);
+	_pthread_mutex_init(&sem_llock, NULL);
 	_pthread_atfork(sem_prefork, sem_postfork, sem_child_postfork);
 }
 


More information about the svn-src-all mailing list