summaryrefslogtreecommitdiff
path: root/implement.h
diff options
context:
space:
mode:
authorrpj <rpj>2000-01-04 10:19:28 +0000
committerrpj <rpj>2000-01-04 10:19:28 +0000
commita378d97dc9d9eadaef00a9f01816948db5f3a796 (patch)
tree654435cc0a85156c2a9b4793ab7d8e0da8424e32 /implement.h
parent27d833666dfd72cc6e74c3900d3e8e66321bea3a (diff)
Main changes (see ChangeLog diff for details and attributions):-
- asynchronous cancellation added - attempt to hide internal exceptions from applications - kernel32 load/free problem fixed - new tests - changes only to comments in some tests
Diffstat (limited to 'implement.h')
-rw-r--r--implement.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/implement.h b/implement.h
index bc76dec..4012301 100644
--- a/implement.h
+++ b/implement.h
@@ -73,6 +73,7 @@ struct pthread_t_ {
void *parms;
int ptErrno;
int detachState;
+ pthread_mutex_t cancelLock; /* Used for async-cancel safety */
int cancelState;
int cancelType;
HANDLE cancelEvent;
@@ -287,19 +288,28 @@ struct ThreadKeyAssoc {
#define _PTHREAD_EPS_CANCEL 0
#define _PTHREAD_EPS_EXIT 1
+/*
+ * '__except' was redefined in pthread.h. We use the real one internally.
+ */
+#ifdef __except
+#undef __except
+#define _pthread__except __except
+#endif
+
#else
#ifdef __cplusplus
-
/*
- * Exceptions similar to the SEH exceptions above.
+ * 'catch' was redefined in pthread.h. We use the real one internally.
*/
-class Pthread_exception_cancel {};
-class Pthread_exception_exit {};
+#ifdef catch
+#undef catch
+#define _pthread_catch catch
+#endif
#else /* __cplusplus */
-#warning File __FILE__, Line __LINE__: Cancellation not supported under C.
+#warning File __FILE__, Line __LINE__: Cancellation not supported if library compiled as C.
#endif /* __cplusplus */
@@ -342,6 +352,8 @@ void _pthread_threadDestroy (pthread_t tid);
void _pthread_cleanupStack (void);
+pthread_t _pthread_new (void);
+
#if ! defined (__MINGW32__) || defined (__MSVCRT__)
unsigned PT_STDCALL
#else