Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Ho ho ho! We can suppress that warning with __diag...
details: https://anonhg.NetBSD.org/src/rev/4380e955a308
branches: trunk
changeset: 995497:4380e955a308
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Dec 25 05:44:13 2018 +0000
description:
Ho ho ho! We can suppress that warning with __diagused! Merry Christmas!
diffstat:
sys/kern/kern_threadpool.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diffs (50 lines):
diff -r d1b9af504163 -r 4380e955a308 sys/kern/kern_threadpool.c
--- a/sys/kern/kern_threadpool.c Tue Dec 25 03:54:44 2018 +0000
+++ b/sys/kern/kern_threadpool.c Tue Dec 25 05:44:13 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_threadpool.c,v 1.2 2018/12/25 02:17:07 kre Exp $ */
+/* $NetBSD: kern_threadpool.c,v 1.3 2018/12/25 05:44:13 thorpej Exp $ */
/*-
* Copyright (c) 2014, 2018 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_threadpool.c,v 1.2 2018/12/25 02:17:07 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_threadpool.c,v 1.3 2018/12/25 05:44:13 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -102,20 +102,13 @@
static ONCE_DECL(threadpool_init_once)
-#ifdef DIAGNOSTIC
#define THREADPOOL_INIT() \
do { \
- int threadpool_init_error = \
+ int threadpool_init_error __diagused = \
RUN_ONCE(&threadpool_init_once, threadpools_init); \
KASSERT(threadpool_init_error == 0); \
} while (/*CONSTCOND*/0)
-#else
-#define THREADPOOL_INIT() \
-do { \
- RUN_ONCE(&threadpool_init_once, threadpools_init); \
-} while (/*CONSTCOND*/0)
-#endif
-
+
/* Data structures */
@@ -731,7 +724,7 @@
return EBUSY;
} while (atomic_cas_uint(&job->job_refcnt, refcnt, (refcnt + 1))
!= refcnt);
-
+
return 0;
}
Home |
Main Index |
Thread Index |
Old Index