Module Name: src
Committed By: kamil
Date: Wed Jan 29 10:55:23 UTC 2020
Modified Files:
src/lib/libpthread: pthread_mutex.c
Log Message:
Mark destroyed pthread_mutexattr_t as dead
To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 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.68 src/lib/libpthread/pthread_mutex.c:1.69
--- src/lib/libpthread/pthread_mutex.c:1.68 Sat Jan 25 18:30:41 2020
+++ src/lib/libpthread/pthread_mutex.c Wed Jan 29 10:55:23 2020
@@ -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_mutexattr_destroy(pthread_mutexa
pthread__error(EINVAL, "Invalid mutex attribute",
attr->ptma_magic == _PT_MUTEXATTR_MAGIC);
+ attr->ptma_magic = _PT_MUTEXATTR_DEAD;
+
return 0;
}