From: Nathan Neulinger Date: Mon, 30 Sep 2002 20:29:10 +0000 (+0000) Subject: lock-header-cleanup-20020930 X-Git-Tag: openafs-devel-1_3_50~594 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=f2da23bb02ed285cf89e3e7be08318085ee7841c lock-header-cleanup-20020930 make sure we include what we mean to --- diff --git a/src/afs/lock.h b/src/afs/lock.h index b3d2e95..203560b 100644 --- a/src/afs/lock.h +++ b/src/afs/lock.h @@ -10,6 +10,10 @@ #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 diff --git a/src/lwp/lock.h b/src/lwp/lock.h index 033da8f..d7beacf 100644 --- a/src/lwp/lock.h +++ b/src/lwp/lock.h @@ -23,6 +23,11 @@ #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. diff --git a/src/venus/lock.h b/src/venus/lock.h index cfbcbee..e53c938 100644 --- a/src/venus/lock.h +++ b/src/venus/lock.h @@ -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