Source-Changes-HG archive

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

[src/trunk]: src/lib/libpthread Mark destroyed pthread_mutexattr_t as dead



details:   https://anonhg.NetBSD.org/src/rev/cbbcb3c88692
branches:  trunk
changeset: 744303:cbbcb3c88692
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Jan 29 10:55:23 2020 +0000

description:
Mark destroyed pthread_mutexattr_t as dead

diffstat:

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

diffs (27 lines):

diff -r adfa7c767543 -r cbbcb3c88692 lib/libpthread/pthread_mutex.c
--- a/lib/libpthread/pthread_mutex.c    Wed Jan 29 09:18:26 2020 +0000
+++ b/lib/libpthread/pthread_mutex.c    Wed Jan 29 10:55:23 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_mutex.c,v 1.68 2020/01/25 18:30:41 ad Exp $    */
+/*     $NetBSD: pthread_mutex.c,v 1.69 2020/01/29 10:55:23 kamil 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.68 2020/01/25 18:30:41 ad Exp $");
+__RCSID("$NetBSD: pthread_mutex.c,v 1.69 2020/01/29 10:55:23 kamil Exp $");
 
 #include <sys/types.h>
 #include <sys/lwpctl.h>
@@ -627,6 +627,8 @@
        pthread__error(EINVAL, "Invalid mutex attribute",
            attr->ptma_magic == _PT_MUTEXATTR_MAGIC);
 
+       attr->ptma_magic = _PT_MUTEXATTR_DEAD;
+
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index