]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Distinguish between macros and functions.
authorBruno Haible <bruno@clisp.org>
Thu, 14 Aug 2008 10:45:49 +0000 (10:45 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:46 +0000 (12:15 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/lock.c
gettext-runtime/intl/lock.h

index 7b9523f2d8aa9e1523a2b1a26ef04b8fe081cf41..588751458d49b6d5fc44d6d79bc87001783b298b 100644 (file)
@@ -1,3 +1,24 @@
+2008-08-14  Bruno Haible  <bruno@clisp.org>
+
+       * 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.
+       * 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-07  Paolo Bonzini  <bonzini@gnu.org>
 
        * lock.c (glthread_recursive_lock_init_multithreaded)
@@ -6,7 +27,7 @@
 2008-08-03  Bruno Haible  <bruno@clisp.org>
 
        Additional non-aborting API for lock.
-       * lib/lock.h: Include <errno.h>.
+       * lock.h: Include <errno.h>.
        (glthread_lock_init): New macro/function.
        (gl_lock_init): Define as wrapper around glthread_lock_init.
        (glthread_lock_lock): New macro/function.
@@ -40,7 +61,7 @@
        (glthread_once): New macro/function.
        (gl_once): Define as wrapper around glthread_once.
        Update function declarations.
-       * lib/lock.c (glthread_rwlock_init_multithreaded): Renamed from
+       * lock.c (glthread_rwlock_init_multithreaded): Renamed from
        glthread_rwlock_init. Return error code.
        (glthread_rwlock_rdlock_multithreaded): Renamed from
        glthread_rwlock_rdlock. Return error code.
index 1a389d79554031a8a54bcdd7e14982c36c9c60e0..982e12ea6b02acefb919912e62ec2b0c2454b590 100644 (file)
@@ -682,7 +682,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)
     {
@@ -700,7 +700,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;
@@ -709,7 +709,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;
@@ -817,7 +817,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)
     {
@@ -871,7 +871,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)
     {
@@ -924,7 +924,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;
@@ -968,7 +968,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;
@@ -995,7 +995,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)
     {
@@ -1025,7 +1025,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;
@@ -1040,7 +1040,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 bf13ba0dab38bbcd958f3be20981ef8a2470c459..9c5003831bc3bceb5338c7e216d424304218be37 100644 (file)
@@ -674,10 +674,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 ------------------------- */
 
@@ -710,11 +716,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 --------------------- */
 
@@ -738,10 +752,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 -------------------------- */