summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/man/fccntl.36
-rw-r--r--include/ouroboros/fccntl.h5
-rw-r--r--src/lib/dev.c4
3 files changed, 11 insertions, 4 deletions
diff --git a/doc/man/fccntl.3 b/doc/man/fccntl.3
index ac28aef5..ad1860ea 100644
--- a/doc/man/fccntl.3
+++ b/doc/man/fccntl.3
@@ -52,7 +52,11 @@ argument. Supported flags are:
\fIFLOWFDOWN\fR - mark flow as down.
-\fIFLOWFNONBLOCK\fR - set I/O to non-blocking.
+\fIFLOWFRNOBLOCK\fR - set read to non-blocking.
+
+\fIFLOWFWNOBLOCK\fR - set write to non-blocking.
+
+\fIFLOWFNONBLOCK\fR - set I/O to non-blocking read/write.
\fIFLOWFDEFAULT\fR - set flow defaults (blocking, read-write).
diff --git a/include/ouroboros/fccntl.h b/include/ouroboros/fccntl.h
index 3bd09e65..afaff8fa 100644
--- a/include/ouroboros/fccntl.h
+++ b/include/ouroboros/fccntl.h
@@ -35,7 +35,10 @@
#define FLOWFDOWN 00000004 /* Flow is down */
-#define FLOWFNONBLOCK 00004000 /* Non-blocking flow */
+#define FLOWFRNOBLOCK 00001000 /* Non-blocking read */
+#define FLOWFWNOBLOCK 00002000 /* Non-blocking write */
+#define FLOWFNONBLOCK 00003000 /* Non-blocking rw */
+
#define FLOWFDEFAULT 00000002 /* Default, blocking, rw */
#define FLOWFINVALID (FLOWFWRONLY | FLOWFRDWR)
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 11ab645d..28a99bc4 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -430,7 +430,7 @@ static ssize_t frcti_read(int fd)
pthread_rwlock_rdlock(&ai.lock);
- noblock = ai.flows[fd].oflags & FLOWFNONBLOCK;
+ noblock = ai.flows[fd].oflags & FLOWFRNOBLOCK;
rb = ai.flows[fd].rx_rb;
if (ai.flows[fd].rcv_timesout) {
@@ -1096,7 +1096,7 @@ ssize_t flow_write(int fd,
return -EPERM;
}
- if (ai.flows[fd].oflags & FLOWFNONBLOCK) {
+ if (ai.flows[fd].oflags & FLOWFWNOBLOCK) {
idx = shm_rdrbuff_write(ai.rdrb,
DU_BUFF_HEADSPACE,
DU_BUFF_TAILSPACE,