Deleted Added
full compact
sys_pipe.c (83366) sys_pipe.c (83805)
1/*
2 * Copyright (c) 1996 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice immediately at the beginning of the file, without modification,
10 * this list of conditions, and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * John S. Dyson.
16 * 4. Modifications may be freely made to this file if the above conditions
17 * are met.
18 *
1/*
2 * Copyright (c) 1996 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice immediately at the beginning of the file, without modification,
10 * this list of conditions, and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * John S. Dyson.
16 * 4. Modifications may be freely made to this file if the above conditions
17 * are met.
18 *
19 * $FreeBSD: head/sys/kern/sys_pipe.c 83366 2001-09-12 08:38:13Z julian $
19 * $FreeBSD: head/sys/kern/sys_pipe.c 83805 2001-09-21 22:46:54Z jhb $
20 */
21
22/*
23 * This file contains a high-performance replacement for the socket-based
24 * pipes scheme originally used in FreeBSD/4.4Lite. It does not support
25 * all features of sockets, but does do everything that pipes normally
26 * do.
27 */

--- 1075 unchanged lines hidden (view full) ---

1103
1104 if ((rpipe->pipe_state & PIPE_EOF) ||
1105 (wpipe == NULL) ||
1106 (wpipe->pipe_state & PIPE_EOF))
1107 revents |= POLLHUP;
1108
1109 if (revents == 0) {
1110 if (events & (POLLIN | POLLRDNORM)) {
20 */
21
22/*
23 * This file contains a high-performance replacement for the socket-based
24 * pipes scheme originally used in FreeBSD/4.4Lite. It does not support
25 * all features of sockets, but does do everything that pipes normally
26 * do.
27 */

--- 1075 unchanged lines hidden (view full) ---

1103
1104 if ((rpipe->pipe_state & PIPE_EOF) ||
1105 (wpipe == NULL) ||
1106 (wpipe->pipe_state & PIPE_EOF))
1107 revents |= POLLHUP;
1108
1109 if (revents == 0) {
1110 if (events & (POLLIN | POLLRDNORM)) {
1111 selrecord(curthread, &rpipe->pipe_sel);
1111 selrecord(td, &rpipe->pipe_sel);
1112 rpipe->pipe_state |= PIPE_SEL;
1113 }
1114
1115 if (events & (POLLOUT | POLLWRNORM)) {
1112 rpipe->pipe_state |= PIPE_SEL;
1113 }
1114
1115 if (events & (POLLOUT | POLLWRNORM)) {
1116 selrecord(curthread, &wpipe->pipe_sel);
1116 selrecord(td, &wpipe->pipe_sel);
1117 wpipe->pipe_state |= PIPE_SEL;
1118 }
1119 }
1120
1121 return (revents);
1122}
1123
1124static int

--- 177 unchanged lines hidden ---
1117 wpipe->pipe_state |= PIPE_SEL;
1118 }
1119 }
1120
1121 return (revents);
1122}
1123
1124static int

--- 177 unchanged lines hidden ---