static void pthread_sync_terminate_thread(void) {
+
(pthread_cache_done || pthread_once(&pthread_cache_once, create_once));
if (terminate_thread_handle == INVALID_HANDLE_VALUE) {
+ CHAR eventName[MAX_PATH];
+ static eventCount = 0;
+ sprintf(eventName, "pthread terminate thread %d", eventCount++);
terminate_thread_wakeup_event = CreateEvent((LPSECURITY_ATTRIBUTES) 0,
- TRUE, FALSE, (LPCTSTR) 0);
+ TRUE, FALSE, (LPCTSTR) eventName);
terminate_thread_handle = CreateThread((LPSECURITY_ATTRIBUTES) 0, 0,
terminate_thread_routine, (LPVOID) 0, 0,
&terminate_thread_id);
if (queue_IsEmpty(&waiter_cache)) {
new = (cond_waiters_t *) malloc(sizeof(cond_waiters_t));
if (new != NULL) {
+ CHAR eventName[MAX_PATH];
+ static eventCount = 0;
+ sprintf(eventName, "cond_waiters_t %d", eventCount++);
new->event = CreateEvent((LPSECURITY_ATTRIBUTES) 0, FALSE,
- FALSE, (LPCTSTR) 0);
+ FALSE, (LPCTSTR) eventName);
if (new->event == NULL) {
free(new);
new = NULL;