summaryrefslogtreecommitdiff
path: root/implement.h
diff options
context:
space:
mode:
authorrpj <rpj>2001-10-25 23:51:53 +0000
committerrpj <rpj>2001-10-25 23:51:53 +0000
commit820ca4b34c23ef8d91edade437f0f9fd781f8b89 (patch)
tree0cf9a2f78eea742c19761b071479d94644278195 /implement.h
parent222a76c37c89ee37eebecd53dd32fd481245e6fa (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 'implement.h')
-rw-r--r--implement.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/implement.h b/implement.h
index dfb2dba..a1cb628 100644
--- a/implement.h
+++ b/implement.h
@@ -380,7 +380,16 @@ enum {
};
+/* Useful macros */
+#define PTW32_MAX(a,b) ((a)<(b)?(b):(a))
+#define PTW32_MIN(a,b) ((a)>(b)?(b):(a))
+
+
/* Declared in global.c */
+extern PTW32_INTERLOCKED_LONG (WINAPI *ptw32_interlocked_compare_exchange)(PTW32_INTERLOCKED_LPLONG,
+ PTW32_INTERLOCKED_LONG,
+ PTW32_INTERLOCKED_LONG);
+
extern int ptw32_processInitialized;
extern pthread_key_t ptw32_selfThreadKey;
extern pthread_key_t ptw32_cleanupKey;
@@ -418,13 +427,8 @@ extern "C" {
* =====================
* =====================
*/
-PTW32_INTERLOCKED_LONG
-(WINAPI *ptw32_interlocked_compare_exchange)(PTW32_INTERLOCKED_LPLONG,
- PTW32_INTERLOCKED_LONG,
- PTW32_INTERLOCKED_LONG);
-
-PTW32_INTERLOCKED_LONG
-ptw32_InterlockedCompareExchange(PTW32_INTERLOCKED_LPLONG ptr,
+PTW32_INTERLOCKED_LONG WINAPI
+ptw32_InterlockedCompareExchange(PTW32_INTERLOCKED_LPLONG location,
PTW32_INTERLOCKED_LONG value,
PTW32_INTERLOCKED_LONG comparand);