sctp_syscalls.c (102540) | sctp_syscalls.c (104393) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * sendfile(2) and related extensions: 6 * Copyright (c) 1998, David Greenman. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * sendfile(2) and related extensions: 6 * Copyright (c) 1998, David Greenman. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 |
37 * $FreeBSD: head/sys/kern/uipc_syscalls.c 102540 2002-08-28 20:56:01Z archie $ | 37 * $FreeBSD: head/sys/kern/uipc_syscalls.c 104393 2002-10-03 02:13:00Z truckman $ |
38 */ 39 40#include "opt_compat.h" 41#include "opt_ktrace.h" 42#include "opt_mac.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> --- 196 unchanged lines hidden (view full) --- 242{ 243 struct filedesc *fdp; 244 struct file *nfp = NULL; 245 struct sockaddr *sa; 246 int namelen, error, s; 247 struct socket *head, *so; 248 int fd; 249 u_int fflag; | 38 */ 39 40#include "opt_compat.h" 41#include "opt_ktrace.h" 42#include "opt_mac.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> --- 196 unchanged lines hidden (view full) --- 242{ 243 struct filedesc *fdp; 244 struct file *nfp = NULL; 245 struct sockaddr *sa; 246 int namelen, error, s; 247 struct socket *head, *so; 248 int fd; 249 u_int fflag; |
250 pid_t pgid; |
|
250 251 mtx_lock(&Giant); 252 fdp = td->td_proc->p_fd; 253 if (uap->name) { 254 error = copyin(uap->anamelen, &namelen, sizeof (namelen)); 255 if(error) 256 goto done2; 257 if (namelen < 0) { --- 61 unchanged lines hidden (view full) --- 319 fhold(nfp); 320 td->td_retval[0] = fd; 321 322 /* connection has been removed from the listen queue */ 323 KNOTE(&head->so_rcv.sb_sel.si_note, 0); 324 325 so->so_state &= ~SS_COMP; 326 so->so_head = NULL; | 251 252 mtx_lock(&Giant); 253 fdp = td->td_proc->p_fd; 254 if (uap->name) { 255 error = copyin(uap->anamelen, &namelen, sizeof (namelen)); 256 if(error) 257 goto done2; 258 if (namelen < 0) { --- 61 unchanged lines hidden (view full) --- 320 fhold(nfp); 321 td->td_retval[0] = fd; 322 323 /* connection has been removed from the listen queue */ 324 KNOTE(&head->so_rcv.sb_sel.si_note, 0); 325 326 so->so_state &= ~SS_COMP; 327 so->so_head = NULL; |
327 if (head->so_sigio != NULL) 328 fsetown(fgetown(head->so_sigio), &so->so_sigio); | 328 pgid = fgetown(&head->so_sigio); 329 if (pgid != 0) 330 fsetown(pgid, &so->so_sigio); |
329 330 FILE_LOCK(nfp); 331 soref(so); /* file descriptor reference */ 332 nfp->f_data = so; /* nfp has ref count from falloc */ 333 nfp->f_flag = fflag; 334 nfp->f_ops = &socketops; 335 nfp->f_type = DTYPE_SOCKET; 336 FILE_UNLOCK(nfp); --- 1684 unchanged lines hidden --- | 331 332 FILE_LOCK(nfp); 333 soref(so); /* file descriptor reference */ 334 nfp->f_data = so; /* nfp has ref count from falloc */ 335 nfp->f_flag = fflag; 336 nfp->f_ops = &socketops; 337 nfp->f_type = DTYPE_SOCKET; 338 FILE_UNLOCK(nfp); --- 1684 unchanged lines hidden --- |