Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpthread In the same spirit as the previous pthread_mu...



details:   https://anonhg.NetBSD.org/src/rev/3083396a58ae
branches:  trunk
changeset: 968881:3083396a58ae
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 31 02:37:46 2020 +0000

description:
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.

diffstat:

 lib/libpthread/pthread_mutex.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r c7f8fb1d0456 -r 3083396a58ae lib/libpthread/pthread_mutex.c
--- a/lib/libpthread/pthread_mutex.c    Fri Jan 31 02:25:06 2020 +0000
+++ b/lib/libpthread/pthread_mutex.c    Fri Jan 31 02:37:46 2020 +0000
@@ -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 @@
 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;



Home | Main Index | Thread Index | Old Index