major improvements to cancellation handling
[oweals/musl.git] / src / internal / libc.h
index 3d09bf6aba35bfe1d0c0d00df5783dd6b13beb0a..c83fcafe456953b8ddd88ada9ae515ff658396e6 100644 (file)
@@ -18,6 +18,7 @@ struct __libc {
        FILE *ofl_head;
        int ofl_lock;
        void (*lockfile)(FILE *);
+       void (*sigtimer)();
 };
 
 
@@ -44,7 +45,8 @@ void __lockfile(FILE *);
 #define UNLOCK(x) (*(x)=0)
 #define CANCELPT(x) (libc.cancelpt ? libc.cancelpt((x)),0 : (void)(x),0)
 #define CANCELPT_BEGIN CANCELPT(1)
-#define CANCELPT_END CANCELPT(0)
+#define CANCELPT_TRY CANCELPT(0)
+#define CANCELPT_END CANCELPT(-1)
 
 extern char **__environ;
 #define environ __environ