summaryrefslogtreecommitdiff
path: root/pthread.h
diff options
context:
space:
mode:
authorrpj <rpj>2004-05-17 01:38:02 +0000
committerrpj <rpj>2004-05-17 01:38:02 +0000
commit771465fed0cf50ee2dd790723245fc091699c324 (patch)
treed8c18d095a33fe7c4564bd90c5f313bb9e4057dd /pthread.h
parent8b14911744f58cbe3730703f3fcc41cd969fd0f3 (diff)
re-indentation, bug fixes, hooks for pre-emptive async cancelation
Diffstat (limited to 'pthread.h')
-rw-r--r--pthread.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/pthread.h b/pthread.h
index 56759b5..0c42fc6 100644
--- a/pthread.h
+++ b/pthread.h
@@ -155,15 +155,14 @@
#ifdef PTW32_INCLUDE_WINDOWS_H
#include <windows.h>
+#endif
-#if _MSC_VER < 1300
+#if defined(_MSC_VER) && _MSC_VER < 1300
/*
* VC++6.0 or early compiler's header has no DWORD_PTR type.
*/
typedef unsigned long DWORD_PTR;
#endif
-#endif
-
/*
* -----------------
* autoconf switches
@@ -507,11 +506,12 @@ extern "C"
/*
* The Open Watcom C/C++ compiler uses a non-standard calling convention
* that passes function args in registers unless __cdecl is explicitly specified
- * in function prototypes.
+ * in exposed function prototypes.
*
- * We force all calls to cdecl even though this will slow Watcom code down
+ * We force all calls to cdecl even though this could slow Watcom code down
* slightly. If you know that the Watcom compiler will be used to build both
- * the DLL and application, then you could probably define this as a null string.
+ * the DLL and application, then you can probably define this as a null string.
+ * Remember that pthread.h (this file) is used for both the DLL and application builds.
*/
#define PTW32_CDECL __cdecl
@@ -1137,6 +1137,15 @@ PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_attach_np(void);
PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_detach_np(void);
/*
+ * Features that are auto-detected at load/run time.
+ */
+PTW32_DLLPORT int PTW32_CDECL pthread_win32_test_features_np(int);
+enum ptw32_features {
+ PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */
+ PTW32_ALERTABLE_ASYNC_CANCEL = 0x0002 /* Can cancel blocked threads. */
+};
+
+/*
* Register a system time change with the library.
* Causes the library to perform various functions
* in response to the change. Should be called whenever