From 9df9c60aa93287211cf9698eb979d80fded765dc Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 21 Apr 2011 21:45:46 +0200 Subject: add cancellation for read, write, close close.c: add function __close_nocancel_no_status to be used internally in libc avoiding inlining it everywhere. Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- include/unistd.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/unistd.h b/include/unistd.h index a886ad1a8..2d53aa4b9 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -354,7 +354,11 @@ libc_hidden_proto(lseek64) This function is a cancellation point and therefore not marked with __THROW. */ extern int close (int __fd); +#ifdef _LIBC +extern __typeof(close) __close_nocancel attribute_hidden; +extern void __close_nocancel_no_status(int) attribute_hidden; libc_hidden_proto(close) +#endif /* Read NBYTES into BUF from FD. Return the number read, -1 for errors or 0 for EOF. @@ -362,14 +366,20 @@ libc_hidden_proto(close) This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur; +#ifdef _LIBC +extern __typeof(read) __read_nocancel attribute_hidden; libc_hidden_proto(read) +#endif /* Write N bytes of BUF to FD. Return the number written, or -1. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t write (int __fd, __const void *__buf, size_t __n) __wur; +#ifdef _LIBC +extern __typeof(write) __write_nocancel attribute_hidden; libc_hidden_proto(write) +#endif #ifdef __USE_UNIX98 # ifndef __USE_FILE_OFFSET64 -- cgit v1.2.3