From 771465fed0cf50ee2dd790723245fc091699c324 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 17 May 2004 01:38:02 +0000 Subject: re-indentation, bug fixes, hooks for pre-emptive async cancelation --- global.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'global.c') diff --git a/global.c b/global.c index 59ebc45..0f7622b 100644 --- a/global.c +++ b/global.c @@ -48,13 +48,26 @@ pthread_cond_t ptw32_cond_list_tail = NULL; int ptw32_concurrency = 0; +/* What features have been auto-detaected */ +int ptw32_features = 0; + /* - * Function pointer to InterlockedCompareExchange if it exists; otherwise NULL + * Function pointer to InterlockedCompareExchange if it exists, otherwise + * it will be set at runtime to a substitute local version with the same + * functionality but may be architecture specific. */ PTW32_INTERLOCKED_LONG -(WINAPI *ptw32_interlocked_compare_exchange)(PTW32_INTERLOCKED_LPLONG, - PTW32_INTERLOCKED_LONG, - PTW32_INTERLOCKED_LONG) = NULL; + (WINAPI * ptw32_interlocked_compare_exchange) (PTW32_INTERLOCKED_LPLONG, + PTW32_INTERLOCKED_LONG, + PTW32_INTERLOCKED_LONG) = + NULL; + +/* + * Function pointer to QueueUserAPCEx if it exists, otherwise + * it will be set at runtime to a substitute routine which cannot unblock + * blocked threads. + */ +DWORD (*ptw32_register_cancelation) (PAPCFUNC, HANDLE, DWORD) = NULL; /* * Global lock for managing pthread_t struct reuse. -- cgit v1.2.3