Module Name: src
Committed By: riastradh
Date: Sat Apr 9 16:59:43 UTC 2016
Modified Files:
src/sys/sys: condvar.h
Log Message:
Don't pollute <sys/condvar.h> with <sys/mutex.h>.
Instead, forward-declare struct kmutex, since we only need to
describe pointer types to it.
This breaks an include cycle on several architectures:
sys/cpu_data.h
-> sys/condvar.h
-> sys/mutex.h
-> sys/intr.h
-> machine/intr.h
-> machine/cpu.h
-> sys/cpu_data.h
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/sys/condvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/condvar.h
diff -u src/sys/sys/condvar.h:1.12 src/sys/sys/condvar.h:1.13
--- src/sys/sys/condvar.h:1.12 Sat Dec 5 22:38:19 2009
+++ src/sys/sys/condvar.h Sat Apr 9 16:59:43 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: condvar.h,v 1.12 2009/12/05 22:38:19 pooka Exp $ */
+/* $NetBSD: condvar.h,v 1.13 2016/04/09 16:59:43 riastradh Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -32,21 +32,21 @@
#ifndef _SYS_CONDVAR_H_
#define _SYS_CONDVAR_H_
-#include <sys/mutex.h>
-
typedef struct kcondvar {
void *cv_opaque[3];
} kcondvar_t;
#ifdef _KERNEL
+struct kmutex;
+
void cv_init(kcondvar_t *, const char *);
void cv_destroy(kcondvar_t *);
-void cv_wait(kcondvar_t *, kmutex_t *);
-int cv_wait_sig(kcondvar_t *, kmutex_t *);
-int cv_timedwait(kcondvar_t *, kmutex_t *, int);
-int cv_timedwait_sig(kcondvar_t *, kmutex_t *, int);
+void cv_wait(kcondvar_t *, struct kmutex *);
+int cv_wait_sig(kcondvar_t *, struct kmutex *);
+int cv_timedwait(kcondvar_t *, struct kmutex *, int);
+int cv_timedwait_sig(kcondvar_t *, struct kmutex *, int);
void cv_signal(kcondvar_t *);
void cv_broadcast(kcondvar_t *);