svr4_filio.c (109153) | svr4_filio.c (109623) |
---|---|
1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1994 Christos Zoulas 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1994 Christos Zoulas 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/compat/svr4/svr4_filio.c 109153 2003-01-13 00:33:17Z dillon $ | 28 * $FreeBSD: head/sys/compat/svr4/svr4_filio.c 109623 2003-01-21 08:56:16Z alfred $ |
29 */ 30 31#include <sys/param.h> 32#include <sys/proc.h> 33#include <sys/systm.h> 34#include <sys/file.h> 35#include <sys/filio.h> 36#include <sys/lock.h> --- 26 unchanged lines hidden (view full) --- 63 int idx = 0, cerr; 64 u_long siz; 65 66 pa.fds = uap->fds; 67 pa.nfds = uap->nfds; 68 pa.timeout = uap->timeout; 69 70 siz = uap->nfds * sizeof(struct pollfd); | 29 */ 30 31#include <sys/param.h> 32#include <sys/proc.h> 33#include <sys/systm.h> 34#include <sys/file.h> 35#include <sys/filio.h> 36#include <sys/lock.h> --- 26 unchanged lines hidden (view full) --- 63 int idx = 0, cerr; 64 u_long siz; 65 66 pa.fds = uap->fds; 67 pa.nfds = uap->nfds; 68 pa.timeout = uap->timeout; 69 70 siz = uap->nfds * sizeof(struct pollfd); |
71 pfd = (struct pollfd *)malloc(siz, M_TEMP, M_WAITOK); | 71 pfd = (struct pollfd *)malloc(siz, M_TEMP, 0); |
72 73 error = poll(td, (struct poll_args *)uap); 74 75 if ((cerr = copyin(uap->fds, pfd, siz)) != 0) { 76 error = cerr; 77 goto done; 78 } 79 --- 155 unchanged lines hidden --- | 72 73 error = poll(td, (struct poll_args *)uap); 74 75 if ((cerr = copyin(uap->fds, pfd, siz)) != 0) { 76 error = cerr; 77 goto done; 78 } 79 --- 155 unchanged lines hidden --- |