Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern Make RUN_ONCE actually run only on...
details: https://anonhg.NetBSD.org/src/rev/289e235ec708
branches: trunk
changeset: 785349:289e235ec708
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Mar 10 11:21:05 2013 +0000
description:
Make RUN_ONCE actually run only once. Also, remove a "slightly"
outdated comment.
diffstat:
sys/rump/librump/rumpkern/sleepq.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diffs (40 lines):
diff -r 96a23289674b -r 289e235ec708 sys/rump/librump/rumpkern/sleepq.c
--- a/sys/rump/librump/rumpkern/sleepq.c Sun Mar 10 09:18:50 2013 +0000
+++ b/sys/rump/librump/rumpkern/sleepq.c Sun Mar 10 11:21:05 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sleepq.c,v 1.13 2011/01/28 17:57:03 pooka Exp $ */
+/* $NetBSD: sleepq.c,v 1.14 2013/03/10 11:21:05 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.13 2011/01/28 17:57:03 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.14 2013/03/10 11:21:05 pooka Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -39,12 +39,6 @@
#include "rump_private.h"
-/*
- * Flimsy and minimalistic sleepq implementation. This is implemented
- * only for the use of callouts in kern_timeout.c. locking etc is
- * completely incorrect, horrible, etc etc etc.
- */
-
syncobj_t sleep_syncobj;
static kcondvar_t sq_cv;
@@ -60,7 +54,7 @@
void
sleepq_init(sleepq_t *sq)
{
- ONCE_DECL(sqctl);
+ static ONCE_DECL(sqctl);
RUN_ONCE(&sqctl, sqinit1);
Home |
Main Index |
Thread Index |
Old Index