summaryrefslogtreecommitdiff
path: root/src/internal/libc.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-04-05 18:00:28 -0400
committerRich Felker <dalias@aerifal.cx>2011-04-05 18:00:28 -0400
commit729cb49f52c825ac44f437e1ff0865d9f0b3626a (patch)
tree18db05e36f16fcdfc1147f4ba1ea19a0ee4bea9c /src/internal/libc.h
parent918a40f257328a2d7490829b54687cd38d7b787b (diff)
downloadmusl-729cb49f52c825ac44f437e1ff0865d9f0b3626a.tar.gz
musl-729cb49f52c825ac44f437e1ff0865d9f0b3626a.tar.bz2
musl-729cb49f52c825ac44f437e1ff0865d9f0b3626a.tar.xz
musl-729cb49f52c825ac44f437e1ff0865d9f0b3626a.zip
new framework to inhibit thread cancellation when needed
with these small changes, libc functions which need to call functions which are cancellation points, but which themselves must not be cancellation points, can use the CANCELPT_INHIBIT and CANCELPT_RESUME macros to temporarily inhibit all cancellation.
Diffstat (limited to 'src/internal/libc.h')
-rw-r--r--src/internal/libc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/internal/libc.h b/src/internal/libc.h
index b80cbcc9..be88dc04 100644
--- a/src/internal/libc.h
+++ b/src/internal/libc.h
@@ -45,6 +45,8 @@ void __lockfile(FILE *);
#define CANCELPT_BEGIN CANCELPT(1)
#define CANCELPT_TRY CANCELPT(0)
#define CANCELPT_END CANCELPT(-1)
+#define CANCELPT_INHIBIT CANCELPT(2)
+#define CANCELPT_RESUME CANCELPT(-2)
extern char **__environ;
#define environ __environ