rx: Define afs_kmutex_t for LWP too
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 23 Oct 2011 20:23:34 +0000 (21:23 +0100)
committerDerrick Brashear <shadow@dementix.org>
Mon, 24 Oct 2011 10:41:20 +0000 (03:41 -0700)
afs_kmutex_t is used for lock definitions in the kernel, and in
pthreaded builds. LWP doesn't have any equivalent, and all structure
members using this type have to be protected with RX_ENABLE_LOCKS, which
starts to become untidy.

Just make afs_kmutex_t an int for LWP, so that we can simplify our
headers, at the expense of some additional storage on LWP builds (which
are going away at some point, anyway)

Change-Id: Iaa5683bdfd932c78a9a5d35b8a4530cecf5bdb37
Reviewed-on: http://gerrit.openafs.org/5660
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/rx/rx_lwp.h

index c77ad9c..3bfe8c9 100644 (file)
 /* KDUMP_KERNEL is defined when kdump includes this header. */
 #ifndef KDUMP_KERNEL
 
+typedef int afs_kmutex_t;
+
 #define CALL_HOLD(call, type)
+#define CALL_HOLD_R(call, type)
 #define CALL_RELE(call, type)
+#define CALL_RELE_R(call, type)
 
 #define MUTEX_DESTROY(a)
 #define MUTEX_ENTER(a)