lwp: add shared-locked macro
authorHartmut Reuter <reuter@rzg.mpg.de>
Thu, 18 Oct 2012 11:32:50 +0000 (07:32 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Fri, 19 Oct 2012 12:07:13 +0000 (05:07 -0700)
we have a macro to check for write locked, add one for shared locked

Change-Id: I2cd7754fd0e725df19b37f2a2234997cb4c34d3f
Reviewed-on: http://gerrit.openafs.org/8252
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/lwp/lock.h

index 6261348..c960a31 100644 (file)
@@ -251,4 +251,7 @@ void Lock_Destroy(struct Lock *lock);
 #define WriteLocked(lock)\
        ((lock)->excl_locked & WRITE_LOCK)
 
+#define SharedLocked(lock)\
+       ((lock)->excl_locked & SHARED_LOCK)
+
 #endif /* LOCK_H */