• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/libpthread-105.1.4/src/

Lines Matching +defs:thread +defs:mutex

62 __private_extern__ int _pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime, int isRelative, int isconforming);
242 _pthread_cond_signal(pthread_cond_t *ocond, bool broadcast, mach_port_t thread)
275 (thread == MACH_PORT_NULL && ((lcntval & PTHRW_COUNT_MASK) == (ucntval & PTHRW_COUNT_MASK)))) {
289 if (thread) {
355 updateval = __psynch_cvsignal(ocond, cvlsgen, ucntval, thread, NULL, 0, 0, flags);
376 * Signal a condition variable, waking a specified thread.
379 pthread_cond_signal_thread_np(pthread_cond_t *ocond, pthread_t thread)
382 if (thread) {
383 mp = pthread_mach_thread_np(thread);
389 * Signal a condition variable, waking only one thread.
398 * Manage a list of condition variables associated with a mutex
405 * this same mutex variable so we can detect invalid 'destroy' sequences.
418 _pthread_mutex *mutex = (_pthread_mutex *)omutex;
427 extern void _pthread_testcancel(pthread_t thread, int isconforming);
435 if (mutex->sig != _PTHREAD_MUTEX_SIG && (mutex->sig & _PTHREAD_MUTEX_SIG_init_MASK) != _PTHREAD_MUTEX_SIG_CMP) {
482 if (cond->busy != NULL && cond->busy != mutex) {
504 cond->busy = mutex;
506 res = __mtx_droplock(mutex, &flags, &npmtx, &mtxgen, &mtxugen);
508 /* TBD: cases are for normal (non owner for recursive mutex; error checking)*/
518 flags &= ~_PTHREAD_MTX_OPT_MUTEX; /* reset the mutex bit as this is cvar */
565 pthread_mutex_t *mutex;
568 pthread_t thread = pthread_self();
571 LOCK(thread->lock);
572 thcanceled = (thread->detached & _PTHREAD_WASCANCEL);
573 UNLOCK(thread->lock);
580 mutex = (pthread_mutex_t *)cond->busy;
583 _pthread_cond_updateval(cond, thread->cancel_error, 0);
588 if (mutex != NULL) {
589 (void)pthread_mutex_lock(mutex);
656 // if L == S, then reset associated mutex
673 pthread_cond_timedwait_relative_np(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
675 return _pthread_cond_wait(cond, mutex, abstime, 1, 0);