lock-header-cleanup-20020930
authorNathan Neulinger <nneul@umr.edu>
Mon, 30 Sep 2002 20:29:10 +0000 (20:29 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 30 Sep 2002 20:29:10 +0000 (20:29 +0000)
make sure we include what we mean to

src/afs/lock.h
src/lwp/lock.h
src/venus/lock.h

index b3d2e95..203560b 100644 (file)
 #ifndef __AFSLOCK_INCLUDE__
 #define        __AFSLOCK_INCLUDE__         1
 
+#if !defined(KERNEL) && !defined(KDUMP_KERNEL)
+#error Do not include afs/lock.h except for kernel code.
+#endif
+
 /*
  * (C) COPYRIGHT IBM CORPORATION 1987
  * LICENSED MATERIALS - PROPERTY OF IBM
index 033da8f..d7beacf 100644 (file)
 #ifndef LOCK_H
 #define LOCK_H
 
+#ifdef KERNEL
+#error Do not include lwp/lock.h for kernel code. Use afs/lock.h instead.
+#endif
+
+
 /* The following macros allow multi statement macros to be defined safely, i.e.
    - the multi statement macro can be the object of an if statement;
    - the call to the multi statement macro may be legally followed by a semi-colon.
index cfbcbee..e53c938 100644 (file)
@@ -7,9 +7,16 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+#error I thought venus/lock.h was never included, what's going on?
+
+#if 0
+/* I believe this file is never actually used */
+
 #ifndef __AFSLOCK_INCLUDE__
 #define        __AFSLOCK_INCLUDE__         1
 
+#warning UMR-INCLUDE venus/lock.h
+
 /*******************************************************************\
 *                                                                  *
 *      Information Technology Center                               *
@@ -185,3 +192,6 @@ can use the locks above to solve this problem, and we do.
 
 */
 #endif /* __AFSLOCK_INCLUDE__ */
+
+
+#endif