Separate the macros and the function symbols.
authorBruno Haible <bruno@clisp.org>
Thu, 14 Aug 2008 10:51:54 +0000 (12:51 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 14 Aug 2008 10:51:54 +0000 (12:51 +0200)
ChangeLog
lib/glthread/lock.c
lib/glthread/lock.h

index d4be462..890dda2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
 2008-08-14  Bruno Haible  <bruno@clisp.org>
 
+       * lib/glthread/lock.h (glthread_lock_lock, glthread_lock_unlock,
+       glthread_lock_destroy, glthread_rwlock_rdlock, glthread_rwlock_wrlock,
+       glthread_rwlock_unlock, glthread_rwlock_destroy,
+       glthread_recursive_lock_lock, glthread_recursive_lock_unlock,
+       glthread_recursive_lock_destroy): Define as macros always.
+       * lib/glthread/lock.c (glthread_lock_lock_func): Renamed from
+       glthread_lock_lock.
+       (glthread_lock_unlock_func): Renamed from glthread_lock_unlock.
+       (glthread_lock_destroy_func): Renamed from glthread_lock_destroy.
+       (glthread_rwlock_rdlock_func): Renamed from glthread_rwlock_rdlock.
+       (glthread_rwlock_wrlock_func): Renamed from glthread_rwlock_wrlock.
+       (glthread_rwlock_unlock_func): Renamed from glthread_rwlock_unlock.
+       (glthread_rwlock_destroy_func): Renamed from glthread_rwlock_destroy.
+       (glthread_recursive_lock_lock_func): Renamed from
+       glthread_recursive_lock_lock.
+       (glthread_recursive_lock_unlock_func): Renamed from
+       glthread_recursive_lock_unlock.
+       (glthread_recursive_lock_destroy_func): Renamed from
+       glthread_recursive_lock_destroy.
+
+2008-08-14  Bruno Haible  <bruno@clisp.org>
+
        * lib/glthread/lock.h: Renamed from lib/lock.h.
        * lib/glthread/lock.c: Renamed from lib/lock.c. Update includes.
        * lib/glthread/tls.h: Renamed from lib/tls.h.
index ac3a0d8..1391617 100644 (file)
@@ -681,7 +681,7 @@ glthread_lock_init_func (gl_lock_t *lock)
 }
 
 int
-glthread_lock_lock (gl_lock_t *lock)
+glthread_lock_lock_func (gl_lock_t *lock)
 {
   if (!lock->guard.done)
     {
@@ -699,7 +699,7 @@ glthread_lock_lock (gl_lock_t *lock)
 }
 
 int
-glthread_lock_unlock (gl_lock_t *lock)
+glthread_lock_unlock_func (gl_lock_t *lock)
 {
   if (!lock->guard.done)
     return EINVAL;
@@ -708,7 +708,7 @@ glthread_lock_unlock (gl_lock_t *lock)
 }
 
 int
-glthread_lock_destroy (gl_lock_t *lock)
+glthread_lock_destroy_func (gl_lock_t *lock)
 {
   if (!lock->guard.done)
     return EINVAL;
@@ -816,7 +816,7 @@ glthread_rwlock_init_func (gl_rwlock_t *lock)
 }
 
 int
-glthread_rwlock_rdlock (gl_rwlock_t *lock)
+glthread_rwlock_rdlock_func (gl_rwlock_t *lock)
 {
   if (!lock->guard.done)
     {
@@ -870,7 +870,7 @@ glthread_rwlock_rdlock (gl_rwlock_t *lock)
 }
 
 int
-glthread_rwlock_wrlock (gl_rwlock_t *lock)
+glthread_rwlock_wrlock_func (gl_rwlock_t *lock)
 {
   if (!lock->guard.done)
     {
@@ -923,7 +923,7 @@ glthread_rwlock_wrlock (gl_rwlock_t *lock)
 }
 
 int
-glthread_rwlock_unlock (gl_rwlock_t *lock)
+glthread_rwlock_unlock_func (gl_rwlock_t *lock)
 {
   if (!lock->guard.done)
     return EINVAL;
@@ -967,7 +967,7 @@ glthread_rwlock_unlock (gl_rwlock_t *lock)
 }
 
 int
-glthread_rwlock_destroy (gl_rwlock_t *lock)
+glthread_rwlock_destroy_func (gl_rwlock_t *lock)
 {
   if (!lock->guard.done)
     return EINVAL;
@@ -994,7 +994,7 @@ glthread_recursive_lock_init_func (gl_recursive_lock_t *lock)
 }
 
 int
-glthread_recursive_lock_lock (gl_recursive_lock_t *lock)
+glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock)
 {
   if (!lock->guard.done)
     {
@@ -1024,7 +1024,7 @@ glthread_recursive_lock_lock (gl_recursive_lock_t *lock)
 }
 
 int
-glthread_recursive_lock_unlock (gl_recursive_lock_t *lock)
+glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock)
 {
   if (lock->owner != GetCurrentThreadId ())
     return EPERM;
@@ -1039,7 +1039,7 @@ glthread_recursive_lock_unlock (gl_recursive_lock_t *lock)
 }
 
 int
-glthread_recursive_lock_destroy (gl_recursive_lock_t *lock)
+glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock)
 {
   if (lock->owner != 0)
     return EBUSY;
index 2064b2f..65b1b83 100644 (file)
@@ -673,10 +673,16 @@ typedef struct
     { { 0, -1 } }
 # define glthread_lock_init(LOCK) \
     (glthread_lock_init_func (LOCK), 0)
+# define glthread_lock_lock(LOCK) \
+    glthread_lock_lock_func (LOCK)
+# define glthread_lock_unlock(LOCK) \
+    glthread_lock_unlock_func (LOCK)
+# define glthread_lock_destroy(LOCK) \
+    glthread_lock_destroy_func (LOCK)
 extern void glthread_lock_init_func (gl_lock_t *lock);
-extern int glthread_lock_lock (gl_lock_t *lock);
-extern int glthread_lock_unlock (gl_lock_t *lock);
-extern int glthread_lock_destroy (gl_lock_t *lock);
+extern int glthread_lock_lock_func (gl_lock_t *lock);
+extern int glthread_lock_unlock_func (gl_lock_t *lock);
+extern int glthread_lock_destroy_func (gl_lock_t *lock);
 
 /* ------------------------- gl_rwlock_t datatype ------------------------- */
 
@@ -709,11 +715,19 @@ typedef struct
     { { 0, -1 } }
 # define glthread_rwlock_init(LOCK) \
     (glthread_rwlock_init_func (LOCK), 0)
+# define glthread_rwlock_rdlock(LOCK) \
+    glthread_rwlock_rdlock_func (LOCK)
+# define glthread_rwlock_wrlock(LOCK) \
+    glthread_rwlock_wrlock_func (LOCK)
+# define glthread_rwlock_unlock(LOCK) \
+    glthread_rwlock_unlock_func (LOCK)
+# define glthread_rwlock_destroy(LOCK) \
+    glthread_rwlock_destroy_func (LOCK)
 extern void glthread_rwlock_init_func (gl_rwlock_t *lock);
-extern int glthread_rwlock_rdlock (gl_rwlock_t *lock);
-extern int glthread_rwlock_wrlock (gl_rwlock_t *lock);
-extern int glthread_rwlock_unlock (gl_rwlock_t *lock);
-extern int glthread_rwlock_destroy (gl_rwlock_t *lock);
+extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock);
 
 /* --------------------- gl_recursive_lock_t datatype --------------------- */
 
@@ -737,10 +751,16 @@ typedef struct
     { { 0, -1 }, 0, 0 }
 # define glthread_recursive_lock_init(LOCK) \
     (glthread_recursive_lock_init_func (LOCK), 0)
+# define glthread_recursive_lock_lock(LOCK) \
+    glthread_recursive_lock_lock_func (LOCK)
+# define glthread_recursive_lock_unlock(LOCK) \
+    glthread_recursive_lock_unlock_func (LOCK)
+# define glthread_recursive_lock_destroy(LOCK) \
+    glthread_recursive_lock_destroy_func (LOCK)
 extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock);
-extern int glthread_recursive_lock_lock (gl_recursive_lock_t *lock);
-extern int glthread_recursive_lock_unlock (gl_recursive_lock_t *lock);
-extern int glthread_recursive_lock_destroy (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock);
 
 /* -------------------------- gl_once_t datatype -------------------------- */