*
* Library of functions implementing reader/writer locks
*/
+
+#include <portable.h>
+
+#include <stdlib.h>
+
#include <lthread.h>
#include <lthread_rdwr.h>
{
rdwrp->readers_reading = 0;
rdwrp->writer_writing = 0;
- pthread_mutex_init(&(rdwrp->mutex), NULL);
- pthread_cond_init(&(rdwrp->lock_free), NULL);
+ pthread_mutex_init(&(rdwrp->mutex), pthread_mutexattr_default);
+ pthread_cond_init(&(rdwrp->lock_free), pthread_condattr_default);
return 0;
}
return(pthread_rdwr_rchk_np(rdwrp) || pthread_rdwr_wchk_np(rdwrp));
}
-#endif LDAP_DEBUG
+#endif /* LDAP_DEBUG */