From f2da23bb02ed285cf89e3e7be08318085ee7841c Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Mon, 30 Sep 2002 20:29:10 +0000 Subject: [PATCH] lock-header-cleanup-20020930 make sure we include what we mean to --- src/afs/lock.h | 4 ++++ src/lwp/lock.h | 5 +++++ src/venus/lock.h | 10 ++++++++++ 3 files changed, 19 insertions(+) diff --git a/src/afs/lock.h b/src/afs/lock.h index b3d2e954a..203560b59 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 033da8fc1..d7beacf4a 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 cfbcbeef0..e53c93825 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 -- 2.39.5