summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread/uthread_open.c')
-rw-r--r--lib/libc_r/uthread/uthread_open.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libc_r/uthread/uthread_open.c b/lib/libc_r/uthread/uthread_open.c
index 2f30ae7..4e9993e 100644
--- a/lib/libc_r/uthread/uthread_open.c
+++ b/lib/libc_r/uthread/uthread_open.c
@@ -44,10 +44,11 @@
int
open(const char *path, int flags,...)
{
- int fd;
- int mode = 0;
- int status;
- va_list ap;
+ int fd;
+ int mode = 0;
+ va_list ap;
+
+ _thread_enter_cancellation_point();
/* Check if the file is being created: */
if (flags & O_CREAT) {
@@ -68,6 +69,8 @@ open(const char *path, int flags,...)
fd = -1;
}
+ _thread_leave_cancellation_point();
+
/* Return the file descriptor or -1 on error: */
return (fd);
}
OpenPOWER on IntegriCloud