summaryrefslogtreecommitdiff
path: root/pthread.h
diff options
context:
space:
mode:
authorrpj <rpj>1999-08-12 00:53:52 +0000
committerrpj <rpj>1999-08-12 00:53:52 +0000
commitf92b4771baf8faccc197ae06922690d1cef74dad (patch)
tree8b06f29abbaf8d1cc027bab0731a9fe79db69413 /pthread.h
parent77d0a6ff70ef2bb480c927e563340fc501ec0930 (diff)
1999-08-12 Ross Johnson <rpj@ixobrychus.canberra.edu.au>snap-1999-05-30-patches
* exit.c (pthread_exit): Check for implicitly created threads to avoid raising an unhandled exception. 1999-07-12 Ross Johnson <rpj@ixobrychus.canberra.edu.au> * condvar.c (pthread_cond_destroy): Add critical section. (cond_timedwait): Add critical section; check for timeout waiting on semaphore. (pthread_cond_broadcast): Add critical section. - Peter Slacik <Peter.Slacik@tatramed.sk> 1999-07-09 Ross Johnson <rpj@ixobrychus.canberra.edu.au> The following changes fix a bug identified by Lorin Hochstein <lmh@xiphos.ca> and solved by John Bossom <John.Bossom@Cognos.COM>. The problem was that cleanup handlers were not executed when pthread_exit() was called. * implement.h (pthread_t_): Add exceptionInformation element for C++ per-thread exception information. (general): Define and rename exceptions. * misc.c (CancelableWait): _PTHREAD_EPS_CANCEL (SEH) and Pthread_exception_cancel (C++) used to identify the exception. * cancel.c (pthread_testcancel): _PTHREAD_EPS_CANCEL (SEH) and Pthread_exception_cancel (C++) used to identify the exception. * exit.c (pthread_exit): throw/raise an exception to return to _pthread_threadStart() to exit the thread. _PTHREAD_EPS_EXIT (SEH) and Pthread_exception_exit (C++) used to identify the exception. * private.c (_pthread_threadStart): Add pthread_exit exception trap; clean up and exit the thread directly rather than via pthread_exit().
Diffstat (limited to 'pthread.h')
-rw-r--r--pthread.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/pthread.h b/pthread.h
index 8ce4d5e..29961f2 100644
--- a/pthread.h
+++ b/pthread.h
@@ -540,6 +540,14 @@ struct sched_param {
* WIN32 SEH
* C
* C++
+ *
+ * Please note that exiting a push/pop block via
+ * "return", "exit", "break", or "continue" will
+ * lead to different behaviour amongst applications
+ * depending upon whether the library was built
+ * using SEH, C++, or C. For example, a library built
+ * with SEH will call the cleanup routine, while both
+ * C++ and C built versions will not.
*/
typedef struct _pthread_cleanup_t _pthread_cleanup_t;
@@ -550,7 +558,7 @@ struct _pthread_cleanup_t
void *arg;
#if !defined(_MSC_VER) && !defined(__cplusplus)
_pthread_cleanup_t *prev;
-#endif
+#endif /* !_MSC_VER && ! __cplusplus */
};
#ifdef _MSC_VER