diff options
| author | John Birrell <jb@FreeBSD.org> | 1998-06-09 23:21:05 +0000 |
|---|---|---|
| committer | John Birrell <jb@FreeBSD.org> | 1998-06-09 23:21:05 +0000 |
| commit | ddc8afd422568750de7698d8a92b79b27599dd2f (patch) | |
| tree | 7b6d63e77297f7bad0d21a6bb68fa893b9a54574 /lib/libpthread/thread/thr_fcntl.c | |
| parent | a67502218841058625ebd524b04693bee2622955 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_fcntl.c')
| -rw-r--r-- | lib/libpthread/thread/thr_fcntl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_fcntl.c b/lib/libpthread/thread/thr_fcntl.c index 9a50c1c159c8..556bd1fa51af 100644 --- a/lib/libpthread/thread/thr_fcntl.c +++ b/lib/libpthread/thread/thr_fcntl.c @@ -47,7 +47,7 @@ fcntl(int fd, int cmd,...) va_list ap; /* Lock the file descriptor: */ - if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) { + if ((ret = _FD_LOCK(fd, FD_RDWR, NULL)) == 0) { /* Initialise the variable argument list: */ va_start(ap, cmd); @@ -80,8 +80,11 @@ fcntl(int fd, int cmd,...) } break; case F_SETFD: + flags = va_arg(ap, int); + ret = _thread_sys_fcntl(fd, cmd, flags); break; case F_GETFD: + ret = _thread_sys_fcntl(fd, cmd, 0); break; case F_GETFL: ret = _thread_fd_table[fd]->flags; @@ -102,7 +105,7 @@ fcntl(int fd, int cmd,...) va_end(ap); /* Unlock the file descriptor: */ - _thread_fd_unlock(fd, FD_RDWR); + _FD_UNLOCK(fd, FD_RDWR); } /* Return the completion status: */ |
