mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 06:50:12 +00:00
Kernel is always defined
When we build the kernel module, either in the real or the ukernel case, KERNEL is defined. So, remove the #ifdefs around our locking primitives, so that things are a little bit clearer. Change-Id: I60893cc630d8cd4dd6cb11cdc44e8bf4f2f9f863 Reviewed-on: http://gerrit.openafs.org/838 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
1a027a3ee1
commit
64778fd7be
@ -53,7 +53,6 @@ typedef struct proc afs_proc_t;
|
||||
#include <ulimit.h>
|
||||
#define get_ulimit() (ulimit(GET_FSIZE, 0) << UBSHIFT)
|
||||
|
||||
#ifdef KERNEL
|
||||
#include <sys/lockl.h>
|
||||
#include <sys/lock_def.h>
|
||||
#include <sys/lock_alloc.h>
|
||||
@ -86,6 +85,5 @@ extern simple_lock_data afs_global_lock;
|
||||
#endif
|
||||
|
||||
#define ifnet_flags(x) (x?(x)->if_flags:0)
|
||||
#endif
|
||||
|
||||
#endif /* _OSI_MACHDEP_H_ */
|
||||
|
@ -155,7 +155,6 @@ void darwin_vn_rele(struct vnode *vp);
|
||||
|
||||
#undef afs_suser
|
||||
|
||||
#ifdef KERNEL
|
||||
extern thread_t afs_global_owner;
|
||||
/* simple locks cannot be used since sleep can happen at any time */
|
||||
#ifdef AFS_DARWIN80_ENV
|
||||
@ -265,6 +264,4 @@ extern int (**afs_vnodeop_p) ();
|
||||
# define SetAfsVnode(v) /* nothing; done in getnewvnode() */
|
||||
#endif
|
||||
|
||||
#endif /* KERNEL */
|
||||
|
||||
#endif /* _OSI_MACHDEP_H_ */
|
||||
|
@ -76,8 +76,6 @@ extern int (**afs_vnodeop_p) ();
|
||||
|
||||
#define afs_strcat(s1, s2) strcat((s1), (s2))
|
||||
|
||||
#ifdef KERNEL
|
||||
|
||||
#undef afs_osi_Alloc_NoSleep
|
||||
#define afs_osi_Alloc_NoSleep(size) osi_fbsd_alloc((size), 0)
|
||||
|
||||
@ -167,7 +165,6 @@ extern struct proc *afs_global_owner;
|
||||
#define NETPRI splvar=splnet()
|
||||
#undef USERPRI
|
||||
#define USERPRI splx(splvar)
|
||||
#endif /* KERNEL */
|
||||
|
||||
#define ifnet_flags(x) (x?(x)->if_flags:0)
|
||||
|
||||
|
@ -44,7 +44,6 @@ typedef proc_t afs_proc_t;
|
||||
|
||||
#define getppid() (afs_uint32)p_ppid(u.u_procp)
|
||||
|
||||
#ifdef KERNEL
|
||||
/*
|
||||
* Global lock support.
|
||||
*
|
||||
@ -84,7 +83,6 @@ extern void afsHashRelease(tid_t key);
|
||||
#define SPLVAR register ulong_t splvar
|
||||
#define NETPRI NET_SPLNET(splvar)
|
||||
#define USERPRI NET_SPLX(splvar)
|
||||
#endif /* KERNEL */
|
||||
|
||||
#if !defined(AFS_HPUX110_ENV)
|
||||
/*
|
||||
|
@ -51,7 +51,6 @@ typedef struct proc afs_proc_t;
|
||||
|
||||
#undef afs_suser
|
||||
|
||||
#ifdef KERNEL
|
||||
extern struct simplelock afs_global_lock;
|
||||
#if 0
|
||||
extern thread_t afs_global_owner;
|
||||
@ -100,6 +99,4 @@ extern int (**afs_vnodeop_p) ();
|
||||
#define IsAfsVnode(v) ((v)->v_op == afs_vnodeop_p)
|
||||
#define SetAfsVnode(v) /* nothing; done in getnewvnode() */
|
||||
|
||||
#endif /* KERNEL */
|
||||
|
||||
#endif /* _OSI_MACHDEP_H_ */
|
||||
|
@ -143,8 +143,6 @@ extern int afs_vget();
|
||||
#define afs_osi_lockmgr(l, f, i, p) lockmgr((l), (f), (i), (p))
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
|
||||
#ifdef AFS_OBSD44_ENV
|
||||
/* Revert to classical, BSD locks */
|
||||
|
||||
@ -224,7 +222,6 @@ extern struct lock afs_global_lock;
|
||||
#define NETPRI splvar=splnet()
|
||||
#undef USERPRI
|
||||
#define USERPRI splx(splvar)
|
||||
#endif /* KERNEL */
|
||||
|
||||
#define osi_InitGlock() \
|
||||
do { \
|
||||
|
@ -71,7 +71,6 @@ extern void *afs_osi_Alloc_NoSleep(size_t size);
|
||||
#define afs_suser(x) suser(x)
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL
|
||||
/*
|
||||
* Global lock support.
|
||||
*/
|
||||
@ -128,5 +127,4 @@ struct afs_ifinfo {
|
||||
int metric;
|
||||
ipaddr_t dstaddr;
|
||||
};
|
||||
#endif
|
||||
#endif /* _OSI_MACHDEP_H_ */
|
||||
|
@ -1069,7 +1069,6 @@ typedef union {
|
||||
afs_mem_dcache_id_t mem;
|
||||
} afs_dcache_id_t;
|
||||
|
||||
#ifdef KERNEL
|
||||
/* it does not compile outside kernel */
|
||||
struct buffer {
|
||||
afs_int32 fid; /* is adc->index, the cache file number */
|
||||
@ -1095,7 +1094,6 @@ struct fcache {
|
||||
afs_int32 chunkBytes; /* Num bytes in this chunk */
|
||||
char states; /* Has this chunk been modified? */
|
||||
};
|
||||
#endif
|
||||
|
||||
/* magic numbers to specify the cache type */
|
||||
|
||||
|
@ -34,7 +34,7 @@ struct afs_icl_set *afs_iclLongTermSetp = (struct afs_icl_set *)0;
|
||||
|
||||
#if defined(AFS_SGI61_ENV)
|
||||
/* For SGI 6.2, this can is changed to 1 if it's a 32 bit kernel. */
|
||||
#if defined(AFS_SGI62_ENV) && defined(KERNEL) && !defined(_K64U64)
|
||||
#if defined(AFS_SGI62_ENV) && !defined(_K64U64)
|
||||
int afs_icl_sizeofLong = 1;
|
||||
#else
|
||||
int afs_icl_sizeofLong = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user