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

CVS commit program cvs at parl.clemson.edu
Thu Oct 19 18:16:48 EDT 2006


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

Modified Files:
      Tag: WALT3
	gen-locks.c gen-locks.h 
Log Message:
reverse merge of HEAD to WALT3 branch.


Index: gen-locks.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/gen-locks/gen-locks.c,v
diff -p -u -r1.7 -r1.7.34.1
--- gen-locks.c	9 Feb 2005 21:46:59 -0000	1.7
+++ gen-locks.c	19 Oct 2006 22:16:48 -0000	1.7.34.1
@@ -121,6 +121,12 @@ int gen_posix_mutex_destroy(
 
     return (0);
 }
+
+pthread_t gen_posix_thread_self(void)
+{
+    return pthread_self();
+}
+
 #endif
 
 /*

Index: gen-locks.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/gen-locks/gen-locks.h,v
diff -p -u -r1.10 -r1.10.36.1
--- gen-locks.h	28 Jul 2004 14:32:34 -0000	1.10
+++ gen-locks.h	19 Oct 2006 22:16:48 -0000	1.10.36.1
@@ -47,8 +47,10 @@ int gen_posix_mutex_destroy(
     pthread_mutex_t * mut);
 int gen_posix_mutex_init(
     pthread_mutex_t * mut);
+pthread_t gen_posix_thread_self(void);
 
 typedef pthread_mutex_t gen_mutex_t;
+typedef pthread_t       gen_thread_t;
 #define GEN_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER;
 #define gen_mutex_lock(m) gen_posix_mutex_lock(m)
 #define gen_mutex_unlock(m) gen_posix_mutex_unlock(m)
@@ -56,12 +58,14 @@ typedef pthread_mutex_t gen_mutex_t;
 #define gen_mutex_build() gen_posix_mutex_build()
 #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__
 	/* this stuff messes around just enough to prevent warnings */
 typedef int gen_mutex_t;
+typedef unsigned long gen_thread_t;
 #define GEN_MUTEX_INITIALIZER 0
 static inline int gen_mutex_lock(
     gen_mutex_t * mutex_p)
@@ -83,7 +87,10 @@ static inline gen_mutex_t *gen_mutex_bui
 {
     return (int *) malloc(sizeof(int));
 }
-
+static inline gen_thread_t gen_thread_self(void)
+{
+    return 0;
+}
 #define gen_mutex_init(m) do{}while(0)
 #define gen_mutex_destroy(m) free(m)
 #endif /* __GEN_NULL_LOCKING__ */



More information about the Pvfs2-cvs mailing list