diff options
Diffstat (limited to 'lib/libkse/thread/thr_fcntl.c')
-rw-r--r-- | lib/libkse/thread/thr_fcntl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/libkse/thread/thr_fcntl.c b/lib/libkse/thread/thr_fcntl.c index 1d12c0e..a5b6405 100644 --- a/lib/libkse/thread/thr_fcntl.c +++ b/lib/libkse/thread/thr_fcntl.c @@ -76,9 +76,10 @@ _fcntl(int fd, int cmd,...) } else { /* * Save the file open flags so that they can - * be checked later: + * be checked later: */ - _thread_fd_table[ret]->flags = _thread_fd_table[fd]->flags; + _thread_fd_setflags(ret, + _thread_fd_getflags(fd)); } break; case F_SETFD: @@ -89,7 +90,7 @@ _fcntl(int fd, int cmd,...) ret = __sys_fcntl(fd, cmd, 0); break; case F_GETFL: - ret = _thread_fd_table[fd]->flags; + ret = _thread_fd_getflags(fd); break; case F_SETFL: /* @@ -119,10 +120,10 @@ _fcntl(int fd, int cmd,...) */ } else if (nonblock) /* A non-blocking descriptor: */ - _thread_fd_table[fd]->flags = flags | O_NONBLOCK; + _thread_fd_setflags(fd, flags | O_NONBLOCK); else /* Save the flags: */ - _thread_fd_table[fd]->flags = flags & ~O_NONBLOCK; + _thread_fd_setflags(fd, flags & ~O_NONBLOCK); break; default: /* Might want to make va_arg use a union */ |