diff options
Diffstat (limited to 'lib/libkse/thread/thr_write.c')
-rw-r--r-- | lib/libkse/thread/thr_write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkse/thread/thr_write.c b/lib/libkse/thread/thr_write.c index e655a34..072b989 100644 --- a/lib/libkse/thread/thr_write.c +++ b/lib/libkse/thread/thr_write.c @@ -59,7 +59,7 @@ _write(int fd, const void *buf, size_t nbytes) /* Lock the file descriptor for write: */ if ((ret = _FD_LOCK(fd, FD_WRITE, NULL)) == 0) { /* Get the read/write mode type: */ - type = _thread_fd_table[fd]->flags & O_ACCMODE; + type = _thread_fd_getflags(fd) & O_ACCMODE; /* Check if the file is not open for write: */ if (type != O_WRONLY && type != O_RDWR) { @@ -70,7 +70,7 @@ _write(int fd, const void *buf, size_t nbytes) } /* Check if file operations are to block */ - blocking = ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0); + blocking = ((_thread_fd_getflags(fd) & O_NONBLOCK) == 0); /* * Loop while no error occurs and until the expected number |