Home | History | Annotate | Download | only in libobjc

Lines Matching defs:condition

400 /* Public condition mutex functions */
402 /* Allocate a condition. Return the condition pointer if successful
407 objc_condition_t condition;
409 /* Allocate the condition mutex structure. */
410 if (! (condition =
414 /* Call the backend to create the condition mutex. */
415 if (__gthread_objc_condition_allocate (condition))
418 objc_free (condition);
423 return condition;
426 /* Deallocate a condition. Note that this includes an implicit
428 opportunity to wake. It is legal to dealloc a condition only if no
432 objc_condition_deallocate (objc_condition_t condition)
434 /* Broadcast the condition. */
435 if (objc_condition_broadcast (condition))
439 if (__gthread_objc_condition_deallocate (condition))
442 /* Free the condition mutex structure. */
443 objc_free (condition);
448 /* Wait on the condition unlocking the mutex until
450 for the same condition. The given mutex *must* have the depth set
452 it and signal/broadcast the condition. The mutex is used to lock
453 access to the shared data that make up the "condition"
456 objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
461 if (! mutex || ! condition)
478 __gthread_objc_condition_wait (condition, mutex);
487 /* Wake up all threads waiting on this condition. It is recommended
489 objc_condition_wait before changing the "condition predicate" and
492 objc_condition_broadcast (objc_condition_t condition)
494 /* Valid condition mutex? */
495 if (! condition)
498 return __gthread_objc_condition_broadcast (condition);
501 /* Wake up one thread waiting on this condition. It is recommended
503 objc_condition_wait before changing the "condition predicate" and
506 objc_condition_signal (objc_condition_t condition)
508 /* Valid condition mutex? */
509 if (! condition)
512 return __gthread_objc_condition_signal (condition);