X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2FWINNT%2Fpthread%2Fpthread.c;h=00d034a209e7a945ee20d8c8b6d5976dd560c443;hp=4c72ab6c17b1391029746a3d3856b59d5dd8a9a2;hb=b37097c6b72528753bb81c15a254e00f2d29dbbd;hpb=fb5bcd00fc6f1560d7d02115a0b5beaa3014a0e7 diff --git a/src/WINNT/pthread/pthread.c b/src/WINNT/pthread/pthread.c index 4c72ab6..00d034a 100644 --- a/src/WINNT/pthread/pthread.c +++ b/src/WINNT/pthread/pthread.c @@ -710,14 +710,22 @@ 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); - if (new->event == NULL) { - free(new); - new = NULL; - } - } + if (new != NULL) { +#if 1 + 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); +#else + new->event = CreateEvent((LPSECURITY_ATTRIBUTES) 0, FALSE, + FALSE, (LPCTSTR) 0); + if (new->event == NULL) { + free(new); + new = NULL; + } +#endif + } } else { new = queue_First(&waiter_cache, cond_waiter); queue_Remove(new); @@ -725,7 +733,6 @@ static cond_waiters_t *get_waiter() { LeaveCriticalSection(&waiter_cache_cs); return new; - } static void put_waiter(cond_waiters_t *old) {