Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread Adjustment to previous: don't call _lwp_unpar...
details: https://anonhg.NetBSD.org/src/rev/347f0a9133ec
branches: trunk
changeset: 1006735:347f0a9133ec
user: ad <ad%NetBSD.org@localhost>
date: Sat Jan 25 18:30:41 2020 +0000
description:
Adjustment to previous: don't call _lwp_unpark_all() with nwaiters == 0.
diffstat:
lib/libpthread/pthread_mutex.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 326f5953f777 -r 347f0a9133ec lib/libpthread/pthread_mutex.c
--- a/lib/libpthread/pthread_mutex.c Sat Jan 25 18:21:37 2020 +0000
+++ b/lib/libpthread/pthread_mutex.c Sat Jan 25 18:30:41 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_mutex.c,v 1.67 2020/01/25 17:58:28 ad Exp $ */
+/* $NetBSD: pthread_mutex.c,v 1.68 2020/01/25 18:30:41 ad 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.67 2020/01/25 17:58:28 ad Exp $");
+__RCSID("$NetBSD: pthread_mutex.c,v 1.68 2020/01/25 18:30:41 ad Exp $");
#include <sys/types.h>
#include <sys/lwpctl.h>
@@ -529,7 +529,7 @@
(void)_lwp_unpark(self->pt_waiters[0],
__UNVOLATILE(&ptm->ptm_waiters));
}
- } else {
+ } else if (self->pt_nwaiters > 0) {
(void)_lwp_unpark_all(self->pt_waiters, self->pt_nwaiters,
__UNVOLATILE(&ptm->ptm_waiters));
}
Home |
Main Index |
Thread Index |
Old Index