+1999-03-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * gthread-posix.c: Use the right default arguments for the
+ construction of mutexes and conds for dce threads, these are
+ &pthread_(cond|mutex)attr_default instead of NULL. Hint from
+ D. Emilio Grimaldo Tunon <emilio_tunon@nl.compuware.com>.
+
1999-03-18 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* Makefile.am (INCLUDES): Added @GTHREAD_COMPILE_IMPL_DEFINES@.
int error = (what); \
if( error ) { posix_print_error( what, error ); } \
}G_STMT_END
+# define mutexattr_default NULL
+# define condattr_default NULL
#elif defined(G_THREADS_IMPL_DCE)
# define posix_check_for_error( what ) G_STMT_START{ \
if( (what) == -1 ) { posix_print_error( what, errno ); } \
}G_STMT_END
+# define mutexattr_default (&pthread_mutexattr_default)
+# define condattr_default (&pthread_condattr_default)
#else /* neither G_THREADS_IMPL_POSIX nor G_THREADS_IMPL_DCE are defined */
# error This should not happen. Contact the GLb team.
#endif
g_mutex_new_posix_impl (void)
{
GMutex *result = (GMutex *) g_new (pthread_mutex_t, 1);
- posix_check_for_error (pthread_mutex_init ((pthread_mutex_t *) result, NULL));
+ posix_check_for_error (pthread_mutex_init ((pthread_mutex_t *) result,
+ mutexattr_default));
return result;
}
g_cond_new_posix_impl (void)
{
GCond *result = (GCond *) g_new (pthread_cond_t, 1);
- posix_check_for_error (pthread_cond_init ((pthread_cond_t *) result, NULL));
+ posix_check_for_error (pthread_cond_init ((pthread_cond_t *) result,
+ condattr_default));
return result;
}