smb_trantcp.c (88739) | smb_trantcp.c (88741) |
---|---|
1/* 2 * Copyright (c) 2000-2001 Boris Popov 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 --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 2000-2001 Boris Popov 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 --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/netsmb/smb_trantcp.c 88739 2001-12-31 17:45:16Z rwatson $ | 32 * $FreeBSD: head/sys/netsmb/smb_trantcp.c 88741 2001-12-31 19:29:43Z bp $ |
33 */ 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/malloc.h> 38#include <sys/mbuf.h> 39#include <sys/proc.h> 40#include <sys/protosw.h> --- 86 unchanged lines hidden (view full) --- 127 error = 0; 128 goto done; 129 } 130 if (tv) { 131 getmicrouptime(&rtv); 132 if (timevalcmp(&rtv, &atv, >=)) { 133 /* 134 * An event of our interest may occur during locking a process. | 33 */ 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/malloc.h> 38#include <sys/mbuf.h> 39#include <sys/proc.h> 40#include <sys/protosw.h> --- 86 unchanged lines hidden (view full) --- 127 error = 0; 128 goto done; 129 } 130 if (tv) { 131 getmicrouptime(&rtv); 132 if (timevalcmp(&rtv, &atv, >=)) { 133 /* 134 * An event of our interest may occur during locking a process. |
135 * In order to avoid missing the event that occured during locking | 135 * In order to avoid missing the event that occurred during locking |
136 * the process, test P_SELECT and rescan file descriptors if 137 * necessary. 138 */ 139 mtx_lock_spin(&sched_lock); 140 if ((td->td_flags & TDF_SELECT) == 0) { 141 td->td_flags |= TDF_SELECT; 142 mtx_unlock_spin(&sched_lock); 143 PROC_UNLOCK(p); --- 561 unchanged lines hidden --- | 136 * the process, test P_SELECT and rescan file descriptors if 137 * necessary. 138 */ 139 mtx_lock_spin(&sched_lock); 140 if ((td->td_flags & TDF_SELECT) == 0) { 141 td->td_flags |= TDF_SELECT; 142 mtx_unlock_spin(&sched_lock); 143 PROC_UNLOCK(p); --- 561 unchanged lines hidden --- |