Add isnanf module.
[pspp] / lib / lock.h
index 3f0da52f43e4ed58694d87ca22b6eb041453a4f1..32a35bbc769c52f841077eac1a1a0253535823f3 100644 (file)
@@ -1,5 +1,5 @@
 /* Locking in multithreaded situations.
-   Copyright (C) 2005-2007 Free Software Foundation, Inc.
+   Copyright (C) 2005-2008 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -361,11 +361,11 @@ typedef pthread_mutex_t gl_recursive_lock_t;
        PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
 #   endif
 #   define gl_recursive_lock_init(NAME) \
-      do                                                                  \
-        {                                                                 \
-          if (pthread_in_use () && pthread_mutex_init (&NAME, NULL) != 0) \
-            abort ();                                                     \
-        }                                                                 \
+      do                                          \
+        {                                         \
+          if (pthread_in_use ())                  \
+            glthread_recursive_lock_init (&NAME); \
+        }                                         \
       while (0)
 #   define gl_recursive_lock_lock(NAME) \
       do                                                            \
@@ -388,6 +388,7 @@ typedef pthread_mutex_t gl_recursive_lock_t;
             abort ();                                                  \
         }                                                              \
       while (0)
+extern void glthread_recursive_lock_init (gl_recursive_lock_t *lock);
 
 #  else
 
@@ -1061,6 +1062,7 @@ typedef int gl_lock_t;
 # define gl_lock_init(NAME)
 # define gl_lock_lock(NAME)
 # define gl_lock_unlock(NAME)
+# define gl_lock_destroy(NAME)
 
 /* ------------------------- gl_rwlock_t datatype ------------------------- */
 
@@ -1071,6 +1073,7 @@ typedef int gl_rwlock_t;
 # define gl_rwlock_rdlock(NAME)
 # define gl_rwlock_wrlock(NAME)
 # define gl_rwlock_unlock(NAME)
+# define gl_rwlock_destroy(NAME)
 
 /* --------------------- gl_recursive_lock_t datatype --------------------- */
 
@@ -1080,6 +1083,7 @@ typedef int gl_recursive_lock_t;
 # define gl_recursive_lock_init(NAME)
 # define gl_recursive_lock_lock(NAME)
 # define gl_recursive_lock_unlock(NAME)
+# define gl_recursive_lock_destroy(NAME)
 
 /* -------------------------- gl_once_t datatype -------------------------- */