summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2009-10-17 14:25:01 -0700
committerAustin Foxley <austinf@cetoncorp.com>2009-10-17 14:25:01 -0700
commit9a737ab7a40984cfdfffd014562a220a3736a10f (patch)
tree51fe4682638ffec59b2bd41d67df82ec60d6b48d /libc/sysdeps/linux/common
parentcfbc0081078b5a41895a2ad689627bf94eeacb43 (diff)
use *_not_cancel variants to avoid accidental cancellations with nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/not-cancel.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/not-cancel.h b/libc/sysdeps/linux/common/not-cancel.h
new file mode 100644
index 000000000..ebdc6078d
--- /dev/null
+++ b/libc/sysdeps/linux/common/not-cancel.h
@@ -0,0 +1,19 @@
+/* By default we have none. Map the name to the normal functions. */
+#define open_not_cancel(name, flags, mode) \
+ open (name, flags, mode)
+#define open_not_cancel_2(name, flags) \
+ open (name, flags)
+#define close_not_cancel(fd) \
+ close (fd)
+#define close_not_cancel_no_status(fd) \
+ (void) close (fd)
+#define read_not_cancel(fd, buf, n) \
+ read (fd, buf, n)
+#define write_not_cancel(fd, buf, n) \
+ write (fd, buf, n)
+#define writev_not_cancel_no_status(fd, iov, n) \
+ (void) writev (fd, iov, n)
+#define fcntl_not_cancel(fd, cmd, val) \
+ fcntl (fd, cmd, val)
+# define waitpid_not_cancel(pid, stat_loc, options) \
+ waitpid (pid, stat_loc, options)