Lines Matching defs:lock
123 static PyThread_type_lock *lock = NULL;
133 /* Allocate a static lock to synchronize writes to keylog file.
134 * The lock is neither released on exit nor on fork(). The lock is
139 if (lock == NULL) {
140 lock = PyThread_allocate_lock();
141 if (lock == NULL) {
142 PyErr_SetString(PyExc_MemoryError, "Unable to allocate lock");
150 PyThread_acquire_lock(lock, 1);
154 PyThread_release_lock(lock);