|
Lines 308-326
Link Here
|
| 308 |
|
308 |
|
| 309 |
if (cond == NULL || abstime == NULL) |
309 |
if (cond == NULL || abstime == NULL) |
| 310 |
rval = EINVAL; |
310 |
rval = EINVAL; |
| 311 |
|
311 |
else if (abstime->tv_sec < 0 || |
| 312 |
if (abstime->tv_sec < 0 || |
312 |
abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) |
| 313 |
abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) { |
313 |
rval = EINVAL; |
| 314 |
errno = EINVAL; |
|
|
| 315 |
_thread_leave_cancellation_point(); |
| 316 |
return (-1); |
| 317 |
} |
| 318 |
|
| 319 |
/* |
314 |
/* |
| 320 |
* If the condition variable is statically initialized, |
315 |
* If the condition variable is statically initialized, |
| 321 |
* perform the dynamic initialization: |
316 |
* perform the dynamic initialization: |
| 322 |
*/ |
317 |
*/ |
| 323 |
if (*cond != NULL || |
318 |
else if (*cond != NULL || |
| 324 |
(rval = pthread_cond_init(cond,NULL)) == 0) { |
319 |
(rval = pthread_cond_init(cond,NULL)) == 0) { |
| 325 |
|
320 |
|
| 326 |
_thread_enter_cancellation_point(); |
321 |
_thread_enter_cancellation_point(); |
|
Lines 473-481
Link Here
|
| 473 |
int rval = 0; |
468 |
int rval = 0; |
| 474 |
pthread_t pthread; |
469 |
pthread_t pthread; |
| 475 |
|
470 |
|
| 476 |
if (cond == NULL || *cond == NULL) |
471 |
if (cond == NULL) |
| 477 |
rval = EINVAL; |
472 |
rval = EINVAL; |
| 478 |
else { |
473 |
/* |
|
|
474 |
* If the condition variable is statically initialized, |
| 475 |
* perform the dynamic initialization: |
| 476 |
*/ |
| 477 |
else if (*cond != NULL || |
| 478 |
(rval = pthread_cond_init(cond, NULL)) == 0) { |
| 479 |
/* |
479 |
/* |
| 480 |
* Defer signals to protect the scheduling queues |
480 |
* Defer signals to protect the scheduling queues |
| 481 |
* from access by the signal handler: |
481 |
* from access by the signal handler: |
|
Lines 525-533
Link Here
|
| 525 |
int rval = 0; |
525 |
int rval = 0; |
| 526 |
pthread_t pthread; |
526 |
pthread_t pthread; |
| 527 |
|
527 |
|
| 528 |
if (cond == NULL || *cond == NULL) |
528 |
if (cond == NULL) |
| 529 |
rval = EINVAL; |
529 |
rval = EINVAL; |
| 530 |
else { |
530 |
/* |
|
|
531 |
* If the condition variable is statically initialized, |
| 532 |
* perform the dynamic initialization: |
| 533 |
*/ |
| 534 |
else if (*cond != NULL || |
| 535 |
(rval = pthread_cond_init(cond,NULL)) == 0) { |
| 531 |
/* |
536 |
/* |
| 532 |
* Defer signals to protect the scheduling queues |
537 |
* Defer signals to protect the scheduling queues |
| 533 |
* from access by the signal handler: |
538 |
* from access by the signal handler: |