[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/common/gen-locks: gen-locks.h

CVS commit program cvs at parl.clemson.edu
Fri Aug 8 11:48:07 EDT 2008


Update of /projects/cvsroot/pvfs2-1/src/common/gen-locks
In directory parlweb1:/tmp/cvs-serv2287/src/common/gen-locks

Modified Files:
      Tag: small-file-branch
	gen-locks.h 
Log Message:
merge robl's fix for multiple GEN_LOCK defines in test programs


Index: gen-locks.h
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/common/gen-locks/gen-locks.h,v
diff -p -u -r1.14 -r1.14.6.1
--- gen-locks.h	24 Jul 2007 18:52:20 -0000	1.14
+++ gen-locks.h	8 Aug 2008 15:48:07 -0000	1.14.6.1
@@ -55,10 +55,8 @@ typedef pthread_t       gen_thread_t;
 #define gen_mutex_destroy(m) gen_posix_mutex_destroy(m)
 #define gen_mutex_init(m) gen_posix_mutex_init(m)
 #define gen_thread_self() gen_posix_thread_self()
-#endif /* __GEN_POSIX_LOCKING__ */
 
-
-#ifdef __GEN_NULL_LOCKING__
+#elif defined (__GEN_NULL_LOCKING__)
 	/* this stuff messes around just enough to prevent warnings */
 typedef int gen_mutex_t;
 typedef unsigned long gen_thread_t;
@@ -87,7 +85,9 @@ static inline gen_thread_t gen_thread_se
 }
 #define gen_mutex_init(m) do{}while(0)
 #define gen_mutex_destroy(m) do{}while(0)
-#endif /* __GEN_NULL_LOCKING__ */
+#else /* __GEN_NULL_LOCKING__ */
+#error "Must define either POSIX or NULL locking"
+#endif
 
 #endif /* __GEN_LOCKS_H */
 



More information about the Pvfs2-cvs mailing list