diff options
| author | rpj <rpj> | 2001-10-25 23:51:53 +0000 | 
|---|---|---|
| committer | rpj <rpj> | 2001-10-25 23:51:53 +0000 | 
| commit | 820ca4b34c23ef8d91edade437f0f9fd781f8b89 (patch) | |
| tree | 0cf9a2f78eea742c19761b071479d94644278195 /nonportable.c | |
| parent | 222a76c37c89ee37eebecd53dd32fd481245e6fa (diff) | |
        * GNUmakefile (libwsock32): Add to linker flags for
        WSAGetLastError() and WSASetLastError().
        * Makefile (wsock32.lib): Likewise.
        * create.c: Minor mostly inert changes.
        * implement.h (PTW32_MAX): Move into here and renamed
        from sched.h.
        (PTW32_MIN): Likewise.
        * GNUmakefile (TEST_ICE): Define if testing internal
        implementation of InterlockedCompareExchange.
        * Makefile (TEST_ICE): Likewise.
        * private.c (TEST_ICE): Likewise.
Diffstat (limited to 'nonportable.c')
| -rw-r--r-- | nonportable.c | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/nonportable.c b/nonportable.c index de9dc07..27363c1 100644 --- a/nonportable.c +++ b/nonportable.c @@ -194,13 +194,15 @@ pthread_win32_process_attach_np ()    pthread_count++;  #endif +#ifndef TEST_ICE +    /*     * Load KERNEL32 and try to get address of InterlockedCompareExchange     */    ptw32_h_kernel32 = LoadLibrary(TEXT("KERNEL32.DLL"));    ptw32_interlocked_compare_exchange = -    (PTW32_INTERLOCKED_LONG (PT_STDCALL *)(PTW32_INTERLOCKED_LPLONG, PTW32_INTERLOCKED_LONG, PTW32_INTERLOCKED_LONG)) +    (PTW32_INTERLOCKED_LONG (WINAPI *)(PTW32_INTERLOCKED_LPLONG, PTW32_INTERLOCKED_LONG, PTW32_INTERLOCKED_LONG))  #if defined(NEED_UNICODE_CONSTS)      GetProcAddress(ptw32_h_kernel32,                     (const TCHAR *)TEXT("InterlockedCompareExchange")); @@ -211,7 +213,7 @@ pthread_win32_process_attach_np ()    if (ptw32_interlocked_compare_exchange == NULL)      { -      ptw32_interlocked_compare_exchange = &ptw32_InterlockedCompareExchange; +      ptw32_interlocked_compare_exchange = ptw32_InterlockedCompareExchange;        /*         * If InterlockedCompareExchange is not being used, then free @@ -231,6 +233,12 @@ pthread_win32_process_attach_np ()        ptw32_h_kernel32 = 0;      } +#else /* TEST_ICE */ + +  ptw32_interlocked_compare_exchange = ptw32_InterlockedCompareExchange; + +#endif /* TEST_ICE */ +    return result;  } | 
