]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-pthread-event-names-20041207
authorJeffrey Altman <jaltman@mit.edu>
Tue, 7 Dec 2004 16:16:09 +0000 (16:16 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 7 Dec 2004 16:16:09 +0000 (16:16 +0000)
pullup change for debugging purposes.

src/WINNT/pthread/pthread.c

index 4c72ab6c17b1391029746a3d3856b59d5dd8a9a2..33a17a4a03e032b3063cb7a7fbdd92474af6437f 100644 (file)
@@ -590,11 +590,14 @@ static void pthread_sync_terminate_thread(void) {
     (pthread_cache_done || pthread_once(&pthread_cache_once, create_once));
 
     if (terminate_thread_handle == INVALID_HANDLE_VALUE) {
-       terminate_thread_wakeup_event = CreateEvent((LPSECURITY_ATTRIBUTES) 0,
-                               TRUE, FALSE, (LPCTSTR) 0);
-       terminate_thread_handle = CreateThread((LPSECURITY_ATTRIBUTES) 0, 0, 
-                               terminate_thread_routine, (LPVOID) 0, 0, 
-                               &terminate_thread_id);
+        CHAR eventName[MAX_PATH];
+        static eventCount = 0;
+        sprintf(eventName, "terminate_thread_wakeup_event %d::%d", _getpid(), eventCount++);
+        terminate_thread_wakeup_event = CreateEvent((LPSECURITY_ATTRIBUTES) 0,
+                                                     TRUE, FALSE, (LPCTSTR) eventName);
+        terminate_thread_handle = CreateThread((LPSECURITY_ATTRIBUTES) 0, 0, 
+                                                terminate_thread_routine, (LPVOID) 0, 0, 
+                                                &terminate_thread_id);
     } else {
        SetEvent (terminate_thread_wakeup_event);
     }
@@ -711,8 +714,11 @@ static cond_waiters_t *get_waiter() {
     if (queue_IsEmpty(&waiter_cache)) {
         new = (cond_waiters_t *) malloc(sizeof(cond_waiters_t));
        if (new != NULL) {
-           new->event = CreateEvent((LPSECURITY_ATTRIBUTES) 0, FALSE,
-                                    FALSE, (LPCTSTR) 0);
+        CHAR eventName[MAX_PATH];
+        static eventCount = 0;
+        sprintf(eventName, "cond_waiters_t %d::%d", _getpid(), eventCount++);
+        new->event = CreateEvent((LPSECURITY_ATTRIBUTES) 0, FALSE,
+                                  FALSE, (LPCTSTR) eventName);
            if (new->event == NULL) {
                free(new);
                new = NULL;