(loc_RunThisThread, loc_BlockThisThread) [_WIN32]:

Add void to parameter declarations.

(empth_threadMain) [_WIN32]: Add static declaration for the function.

(empth_init) [_WIN32]: Change the format "lu" for GetLastError()
in logerror() calls.
This commit is contained in:
Ron Koenderink 2006-01-01 20:23:51 +00:00
parent 8f3f239839
commit 025135bad0

View file

@ -204,7 +204,7 @@ loc_FreeThreadInfo(empth_t *pThread)
* info, and the thread owns the MUTEX sem. * info, and the thread owns the MUTEX sem.
*/ */
static void static void
loc_RunThisThread() loc_RunThisThread(void)
{ {
empth_t *pThread = TlsGetValue(dwTLSIndex); empth_t *pThread = TlsGetValue(dwTLSIndex);
@ -236,7 +236,7 @@ loc_RunThisThread()
* This thread was running. It no longer wants to. * This thread was running. It no longer wants to.
*/ */
static void static void
loc_BlockThisThread() loc_BlockThisThread(void)
{ {
empth_t *pThread = TlsGetValue(dwTLSIndex); empth_t *pThread = TlsGetValue(dwTLSIndex);
@ -309,7 +309,7 @@ loc_BlockMainThread(void)
* This is the main line of each thread. * This is the main line of each thread.
* This is really a static local func.... * This is really a static local func....
*/ */
void static void
empth_threadMain(void *pvData) empth_threadMain(void *pvData)
{ {
time_t now; time_t now;
@ -365,7 +365,7 @@ empth_init(void **ctx_ptr, int flags)
/* Initally unowned. */ /* Initally unowned. */
hThreadMutex = CreateMutex(NULL, FALSE, NULL); hThreadMutex = CreateMutex(NULL, FALSE, NULL);
if (!hThreadMutex) { if (!hThreadMutex) {
logerror("Failed to create mutex %d", GetLastError()); logerror("Failed to create mutex %lu", GetLastError());
return 0; return 0;
} }
@ -373,7 +373,7 @@ empth_init(void **ctx_ptr, int flags)
/* Automatic state reset. */ /* Automatic state reset. */
hThreadStartEvent = CreateEvent(NULL, FALSE, FALSE, NULL); hThreadStartEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
if (!hThreadStartEvent) { if (!hThreadStartEvent) {
logerror("Failed to create start event %d", GetLastError()); logerror("Failed to create start event %lu", GetLastError());
return 0; return 0;
} }
@ -381,7 +381,7 @@ empth_init(void **ctx_ptr, int flags)
/* Manual reset */ /* Manual reset */
hShutdownEvent = CreateEvent(NULL, TRUE, FALSE, NULL); hShutdownEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (!hShutdownEvent) { if (!hShutdownEvent) {
logerror("Failed to create shutdown event %d", GetLastError()); logerror("Failed to create shutdown event %lu", GetLastError());
return 0; return 0;
} }
SetConsoleCtrlHandler((PHANDLER_ROUTINE)loc_Exit_Handler, TRUE); SetConsoleCtrlHandler((PHANDLER_ROUTINE)loc_Exit_Handler, TRUE);