Diff
Not logged in

Differences From Artifact [49e93e9d37]:

To Artifact [629ac680cf]:


202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#endif
    if (mutexthread == mythread) {
	// We owned the lock already, so it's recursive.
	pmutexPtr->counter++;
    } else {
	pthread_mutex_lock(&pmutexPtr->mutex);
#ifdef HAVE_PTHREAD_SPIN_LOCK
    pthread_spin_lock(&pmutexPtr->lock);
#endif
	pmutexPtr->thread = mythread;
#ifdef HAVE_PTHREAD_SPIN_LOCK
    pthread_spin_unlock(&pmutexPtr->lock);
#endif
    }
}

static void
PMutexUnlock(
    PMutex *pmutexPtr)







|



|







202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#endif
    if (mutexthread == mythread) {
	// We owned the lock already, so it's recursive.
	pmutexPtr->counter++;
    } else {
	pthread_mutex_lock(&pmutexPtr->mutex);
#ifdef HAVE_PTHREAD_SPIN_LOCK
	pthread_spin_lock(&pmutexPtr->lock);
#endif
	pmutexPtr->thread = mythread;
#ifdef HAVE_PTHREAD_SPIN_LOCK
	pthread_spin_unlock(&pmutexPtr->lock);
#endif
    }
}

static void
PMutexUnlock(
    PMutex *pmutexPtr)
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
	Tcl_Panic("mutex not owned");
    }
    if (pmutexPtr->counter) {
	// It's recursive
	pmutexPtr->counter--;
    } else {
#ifdef HAVE_PTHREAD_SPIN_LOCK
    pthread_spin_lock(&pmutexPtr->lock);
#endif
	pmutexPtr->thread = 0;
#ifdef HAVE_PTHREAD_SPIN_LOCK
    pthread_spin_unlock(&pmutexPtr->lock);
#endif
	pthread_mutex_unlock(&pmutexPtr->mutex);
    }
}

static void
PCondWait(







|



|







234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
	Tcl_Panic("mutex not owned");
    }
    if (pmutexPtr->counter) {
	// It's recursive
	pmutexPtr->counter--;
    } else {
#ifdef HAVE_PTHREAD_SPIN_LOCK
	pthread_spin_lock(&pmutexPtr->lock);
#endif
	pmutexPtr->thread = 0;
#ifdef HAVE_PTHREAD_SPIN_LOCK
	pthread_spin_unlock(&pmutexPtr->lock);
#endif
	pthread_mutex_unlock(&pmutexPtr->mutex);
    }
}

static void
PCondWait(