Lines Matching refs:import_lock
113 static PyThread_type_lock import_lock = NULL; variable
123 if (import_lock == NULL) { in _PyImport_AcquireLock()
124 import_lock = PyThread_allocate_lock(); in _PyImport_AcquireLock()
125 if (import_lock == NULL) in _PyImport_AcquireLock()
133 !PyThread_acquire_lock(import_lock, 0)) in _PyImport_AcquireLock()
136 PyThread_acquire_lock(import_lock, WAIT_LOCK); in _PyImport_AcquireLock()
148 if (me == PYTHREAD_INVALID_THREAD_ID || import_lock == NULL) in _PyImport_ReleaseLock()
156 PyThread_release_lock(import_lock); in _PyImport_ReleaseLock()
169 if (import_lock != NULL) { in _PyImport_ReInitLock()
170 if (_PyThread_at_fork_reinit(&import_lock) < 0) { in _PyImport_ReInitLock()
178 PyThread_acquire_lock(import_lock, WAIT_LOCK); in _PyImport_ReInitLock()
245 if (import_lock != NULL) { in _PyImport_Fini()
246 PyThread_free_lock(import_lock); in _PyImport_Fini()
247 import_lock = NULL; in _PyImport_Fini()