Another fix:
2008-08-18 Bruno Haible <[EMAIL PROTECTED]>
* lib/glthread/lock.h [USE_SOLARIS_THREADS]: Fix
glthread_recursive_lock_* macros.
* lib/glthread/lock.c (glthread_recursive_lock_destroy_multithreaded):
Fix syntax error.
*** lib/glthread/lock.h.orig 2008-08-18 12:35:16.000000000 +0200
--- lib/glthread/lock.h 2008-08-18 12:21:00.000000000 +0200
***************
*** 577,609 ****
# define gl_recursive_lock_initializer \
{ DEFAULTMUTEX, (thread_t) 0, 0 }
# define glthread_recursive_lock_init(LOCK) \
! do \
! { \
! if (thread_in_use ()) \
! glthread_recursive_lock_init_multithreaded (LOCK); \
! } \
! while (0)
# define glthread_recursive_lock_lock(LOCK) \
! do \
! { \
! if (thread_in_use ()) \
! glthread_recursive_lock_lock_multithreaded (LOCK); \
! } \
! while (0)
# define glthread_recursive_lock_unlock(LOCK) \
! do \
! { \
! if (thread_in_use ()) \
! glthread_recursive_lock_unlock_multithreaded (LOCK); \
! } \
! while (0)
# define glthread_recursive_lock_destroy(LOCK) \
! do \
! { \
! if (thread_in_use ()) \
! glthread_recursive_lock_destroy_multithreaded (LOCK); \
! } \
! while (0)
extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t
*lock);
extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t
*lock);
extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t
*lock);
--- 577,589 ----
# define gl_recursive_lock_initializer \
{ DEFAULTMUTEX, (thread_t) 0, 0 }
# define glthread_recursive_lock_init(LOCK) \
! (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
# define glthread_recursive_lock_lock(LOCK) \
! (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0)
# define glthread_recursive_lock_unlock(LOCK) \
! (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) :
0)
# define glthread_recursive_lock_destroy(LOCK) \
! (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK)
: 0)
extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t
*lock);
extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t
*lock);
extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t
*lock);
*** lib/glthread/lock.c.orig 2008-08-18 12:35:16.000000000 +0200
--- lib/glthread/lock.c 2008-08-18 12:04:59.000000000 +0200
***************
*** 445,451 ****
{
if (lock->owner != (pthread_t) 0)
return EBUSY;
! return (pthread_mutex_destroy (&lock->mutex);
}
# endif
--- 445,451 ----
{
if (lock->owner != (pthread_t) 0)
return EBUSY;
! return pthread_mutex_destroy (&lock->mutex);
}
# endif