projects
/
platform
/
upstream
/
linaro-glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24a49f3
)
(__pthread_cond_init): Handle NULL cond_attr parameter.
author
Ulrich Drepper
<drepper@redhat.com>
Tue, 18 Mar 2003 20:08:20 +0000
(20:08 +0000)
committer
Ulrich Drepper
<drepper@redhat.com>
Tue, 18 Mar 2003 20:08:20 +0000
(20:08 +0000)
nptl/pthread_cond_init.c
patch
|
blob
|
history
diff --git
a/nptl/pthread_cond_init.c
b/nptl/pthread_cond_init.c
index
12a38fb
..
73ae432
100644
(file)
--- 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;