diff options
author | jb <jb@FreeBSD.org> | 1997-04-01 22:44:18 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1997-04-01 22:44:18 +0000 |
commit | 281aa43a363d7072664aaa4271dc65f8a8f1f61c (patch) | |
tree | d4612375bf46a9a209c974a69d936d06cfd2fa39 | |
parent | 4b08ee0ed3858ad5f3ecc94f79c72e6678dbdff5 (diff) | |
download | FreeBSD-src-281aa43a363d7072664aaa4271dc65f8a8f1f61c.zip FreeBSD-src-281aa43a363d7072664aaa4271dc65f8a8f1f61c.tar.gz |
Add parentheses to make blocking mode work.
-rw-r--r-- | lib/libc_r/uthread/uthread_read.c | 4 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_readv.c | 4 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_write.c | 4 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_writev.c | 4 | ||||
-rw-r--r-- | lib/libkse/thread/thr_read.c | 4 | ||||
-rw-r--r-- | lib/libkse/thread/thr_readv.c | 4 | ||||
-rw-r--r-- | lib/libkse/thread/thr_write.c | 4 | ||||
-rw-r--r-- | lib/libkse/thread/thr_writev.c | 4 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_read.c | 4 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_readv.c | 4 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_write.c | 4 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_writev.c | 4 |
12 files changed, 36 insertions, 12 deletions
diff --git a/lib/libc_r/uthread/uthread_read.c b/lib/libc_r/uthread/uthread_read.c index 504143d..242014e 100644 --- a/lib/libc_r/uthread/uthread_read.c +++ b/lib/libc_r/uthread/uthread_read.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ read(int fd, void *buf, size_t nbytes) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking read syscall: */ while ((ret = _thread_sys_read(fd, buf, nbytes)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libc_r/uthread/uthread_readv.c b/lib/libc_r/uthread/uthread_readv.c index fed418b..3ea065e 100644 --- a/lib/libc_r/uthread/uthread_readv.c +++ b/lib/libc_r/uthread/uthread_readv.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ readv(int fd, const struct iovec * iov, int iovcnt) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking readv syscall: */ while ((ret = _thread_sys_readv(fd, iov, iovcnt)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libc_r/uthread/uthread_write.c b/lib/libc_r/uthread/uthread_write.c index 2baa19f..eab105d 100644 --- a/lib/libc_r/uthread/uthread_write.c +++ b/lib/libc_r/uthread/uthread_write.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ write(int fd, const void *buf, size_t nbytes) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking write syscall: */ while ((ret = _thread_sys_write(fd, buf, nbytes)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libc_r/uthread/uthread_writev.c b/lib/libc_r/uthread/uthread_writev.c index 2a3c0c8..5ad1ce9 100644 --- a/lib/libc_r/uthread/uthread_writev.c +++ b/lib/libc_r/uthread/uthread_writev.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ writev(int fd, const struct iovec * iov, int iovcnt) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking writev syscall: */ while ((ret = _thread_sys_writev(fd, iov, iovcnt)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libkse/thread/thr_read.c b/lib/libkse/thread/thr_read.c index 504143d..242014e 100644 --- a/lib/libkse/thread/thr_read.c +++ b/lib/libkse/thread/thr_read.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ read(int fd, void *buf, size_t nbytes) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking read syscall: */ while ((ret = _thread_sys_read(fd, buf, nbytes)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libkse/thread/thr_readv.c b/lib/libkse/thread/thr_readv.c index fed418b..3ea065e 100644 --- a/lib/libkse/thread/thr_readv.c +++ b/lib/libkse/thread/thr_readv.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ readv(int fd, const struct iovec * iov, int iovcnt) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking readv syscall: */ while ((ret = _thread_sys_readv(fd, iov, iovcnt)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libkse/thread/thr_write.c b/lib/libkse/thread/thr_write.c index 2baa19f..eab105d 100644 --- a/lib/libkse/thread/thr_write.c +++ b/lib/libkse/thread/thr_write.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ write(int fd, const void *buf, size_t nbytes) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking write syscall: */ while ((ret = _thread_sys_write(fd, buf, nbytes)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libkse/thread/thr_writev.c b/lib/libkse/thread/thr_writev.c index 2a3c0c8..5ad1ce9 100644 --- a/lib/libkse/thread/thr_writev.c +++ b/lib/libkse/thread/thr_writev.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ writev(int fd, const struct iovec * iov, int iovcnt) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking writev syscall: */ while ((ret = _thread_sys_writev(fd, iov, iovcnt)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libpthread/thread/thr_read.c b/lib/libpthread/thread/thr_read.c index 504143d..242014e 100644 --- a/lib/libpthread/thread/thr_read.c +++ b/lib/libpthread/thread/thr_read.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ read(int fd, void *buf, size_t nbytes) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking read syscall: */ while ((ret = _thread_sys_read(fd, buf, nbytes)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libpthread/thread/thr_readv.c b/lib/libpthread/thread/thr_readv.c index fed418b..3ea065e 100644 --- a/lib/libpthread/thread/thr_readv.c +++ b/lib/libpthread/thread/thr_readv.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ readv(int fd, const struct iovec * iov, int iovcnt) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking readv syscall: */ while ((ret = _thread_sys_readv(fd, iov, iovcnt)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libpthread/thread/thr_write.c b/lib/libpthread/thread/thr_write.c index 2baa19f..eab105d 100644 --- a/lib/libpthread/thread/thr_write.c +++ b/lib/libpthread/thread/thr_write.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ write(int fd, const void *buf, size_t nbytes) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking write syscall: */ while ((ret = _thread_sys_write(fd, buf, nbytes)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; diff --git a/lib/libpthread/thread/thr_writev.c b/lib/libpthread/thread/thr_writev.c index 2a3c0c8..5ad1ce9 100644 --- a/lib/libpthread/thread/thr_writev.c +++ b/lib/libpthread/thread/thr_writev.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ writev(int fd, const struct iovec * iov, int iovcnt) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking writev syscall: */ while ((ret = _thread_sys_writev(fd, iov, iovcnt)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; |