Lines Matching refs:thelock
285 sem_t *thelock = (sem_t *)lock; in PyThread_free_lock() local
291 if (!thelock) in PyThread_free_lock()
294 status = sem_destroy(thelock); in PyThread_free_lock()
297 free((void *)thelock); in PyThread_free_lock()
316 sem_t *thelock = (sem_t *)lock; in PyThread_acquire_lock() local
324 status = fix_status(sem_wait(thelock)); in PyThread_acquire_lock()
326 status = fix_status(sem_trywait(thelock)); in PyThread_acquire_lock()
344 sem_t *thelock = (sem_t *)lock; in PyThread_release_lock() local
350 status = sem_post(thelock); in PyThread_release_lock()
395 pthread_lock *thelock = (pthread_lock *)lock; in PyThread_free_lock() local
401 status = pthread_mutex_destroy( &thelock->mut ); in PyThread_free_lock()
404 status = pthread_cond_destroy( &thelock->lock_released ); in PyThread_free_lock()
407 free((void *)thelock); in PyThread_free_lock()
414 pthread_lock *thelock = (pthread_lock *)lock; in PyThread_acquire_lock() local
420 status = pthread_mutex_lock( &thelock->mut ); in PyThread_acquire_lock()
424 status = pthread_mutex_trylock( &thelock->mut ); in PyThread_acquire_lock()
429 success = thelock->locked == 0; in PyThread_acquire_lock()
436 while ( thelock->locked ) { in PyThread_acquire_lock()
437 status = pthread_cond_wait(&thelock->lock_released, in PyThread_acquire_lock()
438 &thelock->mut); in PyThread_acquire_lock()
444 if (success) thelock->locked = 1; in PyThread_acquire_lock()
445 status = pthread_mutex_unlock( &thelock->mut ); in PyThread_acquire_lock()
457 pthread_lock *thelock = (pthread_lock *)lock; in PyThread_release_lock() local
463 status = pthread_mutex_lock( &thelock->mut ); in PyThread_release_lock()
466 thelock->locked = 0; in PyThread_release_lock()
468 status = pthread_mutex_unlock( &thelock->mut ); in PyThread_release_lock()
472 status = pthread_cond_signal( &thelock->lock_released ); in PyThread_release_lock()