Lines Matching defs:mutex

716     PyThread_type_lock mutex;
730 chan->mutex = PyThread_allocate_lock();
731 if (chan->mutex == NULL) {
734 "can't initialize mutex for new channel");
757 PyThread_acquire_lock(chan->mutex, WAIT_LOCK);
760 PyThread_release_lock(chan->mutex);
762 PyThread_free_lock(chan->mutex);
771 PyThread_acquire_lock(chan->mutex, WAIT_LOCK);
787 PyThread_release_lock(chan->mutex);
795 PyThread_acquire_lock(chan->mutex, WAIT_LOCK);
811 PyThread_release_lock(chan->mutex);
821 PyThread_acquire_lock(chan->mutex, WAIT_LOCK);
836 PyThread_release_lock(chan->mutex);
844 PyThread_acquire_lock(chan->mutex, WAIT_LOCK);
865 PyThread_release_lock(chan->mutex);
932 PyThread_type_lock mutex;
941 if (channels->mutex == NULL) {
942 channels->mutex = PyThread_allocate_lock();
943 if (channels->mutex == NULL) {
945 "can't initialize mutex for channel management");
973 PyThread_acquire_lock(channels->mutex, WAIT_LOCK);
989 // The mutex will be closed by the caller.
990 *pmutex = channels->mutex;
996 PyThread_release_lock(channels->mutex);
1005 PyThread_acquire_lock(channels->mutex, WAIT_LOCK);
1025 PyThread_release_lock(channels->mutex);
1037 PyThread_acquire_lock(channels->mutex, WAIT_LOCK);
1068 if (_channel_set_closing(ref, channels->mutex) != 0) {
1089 PyThread_release_lock(channels->mutex);
1115 PyThread_acquire_lock(channels->mutex, WAIT_LOCK);
1132 PyThread_release_lock(channels->mutex);
1140 PyThread_acquire_lock(channels->mutex, WAIT_LOCK);
1151 PyThread_release_lock(channels->mutex);
1158 PyThread_acquire_lock(channels->mutex, WAIT_LOCK);
1178 PyThread_release_lock(channels->mutex);
1185 PyThread_acquire_lock(channels->mutex, WAIT_LOCK);
1198 PyThread_release_lock(channels->mutex);
1209 _channel_set_closing(struct _channelref *ref, PyThread_type_lock mutex) {
1216 PyThread_acquire_lock(chan->mutex, WAIT_LOCK);
1229 PyThread_release_lock(chan->mutex);
1235 PyThread_acquire_lock(chan->mutex, WAIT_LOCK);
1240 PyThread_release_lock(chan->mutex);
1295 PyThread_type_lock mutex = NULL;
1296 _PyChannelState *chan = _channels_lookup(channels, id, &mutex);
1300 // Past this point we are responsible for releasing the mutex.
1304 PyThread_release_lock(mutex);
1311 PyThread_release_lock(mutex);
1315 PyThread_release_lock(mutex);
1322 PyThread_release_lock(mutex);
1341 PyThread_type_lock mutex = NULL;
1342 _PyChannelState *chan = _channels_lookup(channels, id, &mutex);
1346 // Past this point we are responsible for releasing the mutex.
1350 PyThread_release_lock(mutex);
1375 PyThread_type_lock mutex = NULL;
1376 _PyChannelState *chan = _channels_lookup(channels, id, &mutex);
1380 // Past this point we are responsible for releasing the mutex.
1384 PyThread_release_lock(mutex);