aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-18 20:08:20 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-18 20:08:20 +0000
commit856874c5e9af5d109236e291384eb678507b75ff (patch)
tree7c15e378510190bc113ace42220a2257e68348f7 /nptl
parent24a49f38ad4f05aca5d4b55b2bc1ac31347342ce (diff)
downloadglibc-856874c5e9af5d109236e291384eb678507b75ff.zip
glibc-856874c5e9af5d109236e291384eb678507b75ff.tar.gz
glibc-856874c5e9af5d109236e291384eb678507b75ff.tar.bz2
(__pthread_cond_init): Handle NULL cond_attr parameter.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/pthread_cond_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nptl/pthread_cond_init.c b/nptl/pthread_cond_init.c
index 12a38fb..73ae432 100644
--- a/nptl/pthread_cond_init.c
+++ b/nptl/pthread_cond_init.c
@@ -31,7 +31,8 @@ __pthread_cond_init (cond, cond_attr)
struct pthread_condattr *icond_attr = (struct pthread_condattr *) cond_attr;
cond->__data.__lock = LLL_MUTEX_LOCK_INITIALIZER;
- cond->__data.__clock = (icond_attr->value & 0xfe) >> 1;
+ cond->__data.__clock = (icond_attr == NULL
+ ? CLOCK_REALTIME : (icond_attr->value & 0xfe) >> 1);
cond->__data.__total_seq = 0;
cond->__data.__wakeup_seq = 0;
cond->__data.__woken_seq = 0;