diff options
author | mini <mini@FreeBSD.org> | 2002-09-16 19:52:52 +0000 |
---|---|---|
committer | mini <mini@FreeBSD.org> | 2002-09-16 19:52:52 +0000 |
commit | 6077cee24228562d15e285d132213eeb718439b7 (patch) | |
tree | 19954471d255ce812e704c80bd079f406bc31378 /lib/libpthread/thread/thr_open.c | |
parent | ed825a4bd02ff20716e59e0da4db93b761df2734 (diff) | |
download | FreeBSD-src-6077cee24228562d15e285d132213eeb718439b7.zip FreeBSD-src-6077cee24228562d15e285d132213eeb718439b7.tar.gz |
Make libpthread KSE aware.
Reviewed by: deischen, julian
Approved by: -arch
Diffstat (limited to 'lib/libpthread/thread/thr_open.c')
-rw-r--r-- | lib/libpthread/thread/thr_open.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/lib/libpthread/thread/thr_open.c b/lib/libpthread/thread/thr_open.c index 3e0da32..b8a6635 100644 --- a/lib/libpthread/thread/thr_open.c +++ b/lib/libpthread/thread/thr_open.c @@ -43,36 +43,6 @@ __weak_reference(__open, open); int -_open(const char *path, int flags,...) -{ - int fd; - int mode = 0; - va_list ap; - - /* Check if the file is being created: */ - if (flags & O_CREAT) { - /* Get the creation mode: */ - va_start(ap, flags); - mode = va_arg(ap, int); - va_end(ap); - } - /* Open the file: */ - if ((fd = __sys_open(path, flags, mode)) < 0) { - } - /* Initialise the file descriptor table entry: */ - else if (_thread_fd_table_init(fd) != 0) { - /* Quietly close the file: */ - __sys_close(fd); - - /* Reset the file descriptor: */ - fd = -1; - } - - /* Return the file descriptor or -1 on error: */ - return (fd); -} - -int __open(const char *path, int flags,...) { int ret; @@ -89,7 +59,7 @@ __open(const char *path, int flags,...) va_end(ap); } - ret = _open(path, flags, mode); + ret = __sys_open(path, flags, mode); _thread_leave_cancellation_point(); return ret; |