Check-in Number:
|
4887 | |
Date: |
2004-Dec-03 17:17:54 (local)
2004-Dec-03 16:17:54 (UTC) |
User: | rse |
Branch: | |
Comment: |
Enhance internal pth_mctx_save() if getcontext(3) is used for the
machine context saving by better emulating the setjmp(3) style
semantics. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/pth/ChangeLog 1.628 -> 1.629
--- ChangeLog 2004/10/18 19:35:45 1.628
+++ ChangeLog 2004/12/03 16:17:54 1.629
@@ -21,6 +21,11 @@
Changes between 2.0.2 and 2.0.3 (12-Sep-2004 to xx-xxx-2004)
+ *) Enhance internal pth_mctx_save() if getcontext(3) is used for the
+ machine context saving by better emulating the setjmp(3) style
+ return code semantics.
+ [Ralf S. Engelschall]
+
*) Do not break in pth_msgport_find() if a message port
was created with a NULL name.
[Ralf S. Engelschall]
|
|
ossp-pkg/pth/pth_mctx.c 1.59 -> 1.60
--- pth_mctx.c 2004/07/13 10:50:49 1.59
+++ pth_mctx.c 2004/12/03 16:17:54 1.60
@@ -47,6 +47,7 @@
struct pth_mctx_st {
#if PTH_MCTX_MTH(mcsc)
ucontext_t uc;
+ int restored;
#elif PTH_MCTX_MTH(sjlj)
pth_sigjmpbuf jb;
#else
@@ -69,7 +70,9 @@
#if PTH_MCTX_MTH(mcsc)
#define pth_mctx_save(mctx) \
( (mctx)->error = errno, \
- getcontext(&(mctx)->uc) )
+ (mctx)->restored = 0, \
+ getcontext(&(mctx)->uc), \
+ (mctx)->restored )
#elif PTH_MCTX_MTH(sjlj) && PTH_MCTX_DSP(sjlje)
#define pth_mctx_save(mctx) \
( (mctx)->error = errno, \
@@ -90,6 +93,7 @@
#if PTH_MCTX_MTH(mcsc)
#define pth_mctx_restore(mctx) \
( errno = (mctx)->error, \
+ (mctx)->restored = 1, \
(void)setcontext(&(mctx)->uc) )
#elif PTH_MCTX_MTH(sjlj)
#define pth_mctx_restore(mctx) \
|
|