summaryrefslogtreecommitdiffstats
path: root/sys/sys/pipe.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-03-07 07:31:50 +0000
committerkib <kib@FreeBSD.org>2012-03-07 07:31:50 +0000
commit9d4d411642d8ae4323ed9b0a43cc35dcd602a654 (patch)
tree962288acaad3ba101c032ff509e596c7e1619d71 /sys/sys/pipe.h
parent1ead29e7154b634bb94ffd418424a2000e42c68c (diff)
downloadFreeBSD-src-9d4d411642d8ae4323ed9b0a43cc35dcd602a654.zip
FreeBSD-src-9d4d411642d8ae4323ed9b0a43cc35dcd602a654.tar.gz
The pipe_poll() performs lockless access to the vnode to test
fifo_iseof() condition, allowing the v_fifoinfo to be reset and freed by fifo_cleanup(). Precalculate EOF at the places were fo_wgen is changed, and cache the state in a new pipe state flag PIPE_SAMEWGEN. Reported and tested by: bf Submitted by: gianni MFC after: 1 week (a backport)
Diffstat (limited to 'sys/sys/pipe.h')
-rw-r--r--sys/sys/pipe.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/pipe.h b/sys/sys/pipe.h
index 36e3021..d60185a 100644
--- a/sys/sys/pipe.h
+++ b/sys/sys/pipe.h
@@ -96,6 +96,7 @@ struct pipemapping {
#define PIPE_DIRECTW 0x400 /* Pipe direct write active. */
#define PIPE_DIRECTOK 0x800 /* Direct mode ok. */
#define PIPE_NAMED 0x1000 /* Is a named pipe. */
+#define PIPE_SAMEWGEN 0x2000 /* same write generation for named pipes. */
/*
* Per-pipe data structure.
OpenPOWER on IntegriCloud