svn commit: r317900 - stable/10/lib/libc/gen

Konstantin Belousov kib at FreeBSD.org
Sun May 7 08:02:30 UTC 2017


Author: kib
Date: Sun May  7 08:02:28 2017
New Revision: 317900
URL: https://svnweb.freebsd.org/changeset/base/317900

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

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

Modified: stable/10/lib/libc/gen/sem_new.c
==============================================================================
--- stable/10/lib/libc/gen/sem_new.c	Sun May  7 08:01:29 2017	(r317899)
+++ stable/10/lib/libc/gen/sem_new.c	Sun May  7 08:02:28 2017	(r317900)
@@ -101,12 +101,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-stable mailing list