• Home
  • Raw
  • Download

Lines Matching refs:lock

278     sem_t *lock;  in PyThread_allocate_lock()  local
285 lock = (sem_t *)PyMem_RawMalloc(sizeof(sem_t)); in PyThread_allocate_lock()
287 if (lock) { in PyThread_allocate_lock()
288 status = sem_init(lock,0,1); in PyThread_allocate_lock()
292 PyMem_RawFree((void *)lock); in PyThread_allocate_lock()
293 lock = NULL; in PyThread_allocate_lock()
297 dprintf(("PyThread_allocate_lock() -> %p\n", lock)); in PyThread_allocate_lock()
298 return (PyThread_type_lock)lock; in PyThread_allocate_lock()
302 PyThread_free_lock(PyThread_type_lock lock) in PyThread_free_lock() argument
304 sem_t *thelock = (sem_t *)lock; in PyThread_free_lock()
308 dprintf(("PyThread_free_lock(%p) called\n", lock)); in PyThread_free_lock()
332 PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds, in PyThread_acquire_lock_timed() argument
336 sem_t *thelock = (sem_t *)lock; in PyThread_acquire_lock_timed()
342 lock, microseconds, intr_flag)); in PyThread_acquire_lock_timed()
381 lock, microseconds, intr_flag, success)); in PyThread_acquire_lock_timed()
386 PyThread_release_lock(PyThread_type_lock lock) in PyThread_release_lock() argument
388 sem_t *thelock = (sem_t *)lock; in PyThread_release_lock()
392 dprintf(("PyThread_release_lock(%p) called\n", lock)); in PyThread_release_lock()
406 pthread_lock *lock; in PyThread_allocate_lock() local
413 lock = (pthread_lock *) PyMem_RawMalloc(sizeof(pthread_lock)); in PyThread_allocate_lock()
414 if (lock) { in PyThread_allocate_lock()
415 memset((void *)lock, '\0', sizeof(pthread_lock)); in PyThread_allocate_lock()
416 lock->locked = 0; in PyThread_allocate_lock()
418 status = pthread_mutex_init(&lock->mut, in PyThread_allocate_lock()
426 _Py_ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX(&lock->mut); in PyThread_allocate_lock()
428 status = pthread_cond_init(&lock->lock_released, in PyThread_allocate_lock()
433 PyMem_RawFree((void *)lock); in PyThread_allocate_lock()
434 lock = 0; in PyThread_allocate_lock()
438 dprintf(("PyThread_allocate_lock() -> %p\n", lock)); in PyThread_allocate_lock()
439 return (PyThread_type_lock) lock; in PyThread_allocate_lock()
443 PyThread_free_lock(PyThread_type_lock lock) in PyThread_free_lock() argument
445 pthread_lock *thelock = (pthread_lock *)lock; in PyThread_free_lock()
449 dprintf(("PyThread_free_lock(%p) called\n", lock)); in PyThread_free_lock()
464 PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds, in PyThread_acquire_lock_timed() argument
468 pthread_lock *thelock = (pthread_lock *)lock; in PyThread_acquire_lock_timed()
472 lock, microseconds, intr_flag)); in PyThread_acquire_lock_timed()
525 lock, microseconds, intr_flag, success)); in PyThread_acquire_lock_timed()
530 PyThread_release_lock(PyThread_type_lock lock) in PyThread_release_lock() argument
532 pthread_lock *thelock = (pthread_lock *)lock; in PyThread_release_lock()
536 dprintf(("PyThread_release_lock(%p) called\n", lock)); in PyThread_release_lock()
554 PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) in PyThread_acquire_lock() argument
556 return PyThread_acquire_lock_timed(lock, waitflag ? -1 : 0, /*intr_flag=*/0); in PyThread_acquire_lock()