OSSP CVS Repository

ossp - Difference in ossp-pkg/pth/pth_mctx.c versions 1.59 and 1.60
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

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) \

CVSTrac 2.0.1