mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 07:10:06 +00:00
(__pthread_cond_init): Handle NULL cond_attr parameter.
This commit is contained in:
parent
24a49f38ad
commit
856874c5e9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user