Deleted Added
full compact
sys_pipe.c (102241) sys_pipe.c (104094)
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 102241 2002-08-21 23:39:52Z archie $
19 * $FreeBSD: head/sys/kern/sys_pipe.c 104094 2002-09-28 17:15:38Z phk $
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 */

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

1149
1150 PIPE_UNLOCK(rpipe);
1151 return (error);
1152}
1153
1154/*
1155 * we implement a very minimal set of ioctls for compatibility with sockets.
1156 */
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 */

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

1149
1150 PIPE_UNLOCK(rpipe);
1151 return (error);
1152}
1153
1154/*
1155 * we implement a very minimal set of ioctls for compatibility with sockets.
1156 */
1157int
1157static int
1158pipe_ioctl(fp, cmd, data, active_cred, td)
1159 struct file *fp;
1160 u_long cmd;
1161 void *data;
1162 struct ucred *active_cred;
1163 struct thread *td;
1164{
1165 struct pipe *mpipe = (struct pipe *)fp->f_data;

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

1211 case TIOCGPGRP:
1212 *(int *)data = -fgetown(mpipe->pipe_sigio);
1213 return (0);
1214
1215 }
1216 return (ENOTTY);
1217}
1218
1158pipe_ioctl(fp, cmd, data, active_cred, td)
1159 struct file *fp;
1160 u_long cmd;
1161 void *data;
1162 struct ucred *active_cred;
1163 struct thread *td;
1164{
1165 struct pipe *mpipe = (struct pipe *)fp->f_data;

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

1211 case TIOCGPGRP:
1212 *(int *)data = -fgetown(mpipe->pipe_sigio);
1213 return (0);
1214
1215 }
1216 return (ENOTTY);
1217}
1218
1219int
1219static int
1220pipe_poll(fp, events, active_cred, td)
1221 struct file *fp;
1222 int events;
1223 struct ucred *active_cred;
1224 struct thread *td;
1225{
1226 struct pipe *rpipe = (struct pipe *)fp->f_data;
1227 struct pipe *wpipe;

--- 278 unchanged lines hidden ---
1220pipe_poll(fp, events, active_cred, td)
1221 struct file *fp;
1222 int events;
1223 struct ucred *active_cred;
1224 struct thread *td;
1225{
1226 struct pipe *rpipe = (struct pipe *)fp->f_data;
1227 struct pipe *wpipe;

--- 278 unchanged lines hidden ---