Module Name: src
Committed By: christos
Date: Fri Jan 31 02:37:47 UTC 2020
Modified Files:
src/lib/libpthread: pthread_mutex.c
Log Message:
In the same spirit as the previous pthread_mutex_init change for jemalloc,
make pthread_mutexattr_init do always a full initialization, so that the
attribute that will be used later when we become threaded is properly
initialized.
To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/lib/libpthread/pthread_mutex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libpthread/pthread_mutex.c
diff -u src/lib/libpthread/pthread_mutex.c:1.70 src/lib/libpthread/pthread_mutex.c:1.71
--- src/lib/libpthread/pthread_mutex.c:1.70 Wed Jan 29 16:11:24 2020
+++ src/lib/libpthread/pthread_mutex.c Thu Jan 30 21:37:46 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_mutex.c,v 1.70 2020/01/29 21:11:24 kamil Exp $ */
+/* $NetBSD: pthread_mutex.c,v 1.71 2020/01/31 02:37:46 christos Exp $ */
/*-
* Copyright (c) 2001, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_mutex.c,v 1.70 2020/01/29 21:11:24 kamil Exp $");
+__RCSID("$NetBSD: pthread_mutex.c,v 1.71 2020/01/31 02:37:46 christos Exp $");
#include <sys/types.h>
#include <sys/lwpctl.h>
@@ -616,8 +616,10 @@ pthread__mutex_wakeup(pthread_t self, pt
int
pthread_mutexattr_init(pthread_mutexattr_t *attr)
{
+#if 0
if (__predict_false(__uselibcstub))
return __libc_mutexattr_init_stub(attr);
+#endif
attr->ptma_magic = _PT_MUTEXATTR_MAGIC;
attr->ptma_private = (void *)PTHREAD_MUTEX_DEFAULT;