ossp-pkg/ex/ex.pod 1.32 -> 1.33
--- ex.pod 2006/08/10 19:49:33 1.32
+++ ex.pod 2007/10/12 19:57:56 1.33
@@ -598,13 +598,20 @@
/* callback: context fetching */
static ex_ctx_t *pthread_ex_ctx(void)
{
- return (ex_ctx_t *)
- pthread_getspecific(pthread_ex_ctx_key);
+ ex_ctx_t *ctx;
+
+ if ((ctx = (ex_ctx_t *)pthread_getspecific(pthread_ex_ctx_key)) == NULL)
+ return __ex_ctx_default();
+ return ctx;
}
/* callback: termination */
static void pthread_ex_terminate(ex_t *e)
{
+ ex_ctx_t *ctx;
+
+ if ((ctx = (ex_ctx_t *)pthread_getspecific(pthread_ex_ctx_key)) == NULL)
+ __ex_terminate_default(e);
pthread_exit(e->ex_value);
}
|
|