version 1.52, 2004/03/03 21:35:52 |
version 1.53, 2004/03/03 22:00:34 |
Line 216 sys_pipe(l, v, retval) |
|
Line 216 sys_pipe(l, v, retval) |
|
register_t *retval; |
register_t *retval; |
{ |
{ |
struct file *rf, *wf; |
struct file *rf, *wf; |
struct pipe *rpipe = NULL, *wpipe = NULL; |
struct pipe *rpipe, *wpipe; |
int fd, error; |
int fd, error; |
struct proc *p; |
struct proc *p; |
|
|
Line 323 pipe_create(pipep, allockva) |
|
Line 323 pipe_create(pipep, allockva) |
|
memset(pipe, 0, sizeof(struct pipe)); |
memset(pipe, 0, sizeof(struct pipe)); |
pipe->pipe_state = PIPE_SIGNALR; |
pipe->pipe_state = PIPE_SIGNALR; |
|
|
if (allockva && (error = pipespace(pipe, PIPE_SIZE))) |
|
return (error); |
|
|
|
PIPE_TIMESTAMP(&pipe->pipe_ctime); |
PIPE_TIMESTAMP(&pipe->pipe_ctime); |
pipe->pipe_atime = pipe->pipe_ctime; |
pipe->pipe_atime = pipe->pipe_ctime; |
pipe->pipe_mtime = pipe->pipe_ctime; |
pipe->pipe_mtime = pipe->pipe_ctime; |
simple_lock_init(&pipe->pipe_slock); |
simple_lock_init(&pipe->pipe_slock); |
lockinit(&pipe->pipe_lock, PRIBIO | PCATCH, "pipelk", 0, 0); |
lockinit(&pipe->pipe_lock, PRIBIO | PCATCH, "pipelk", 0, 0); |
|
|
|
if (allockva && (error = pipespace(pipe, PIPE_SIZE))) |
|
return (error); |
|
|
return (0); |
return (0); |
} |
} |
|
|