sys_generic.c (224910) | sys_generic.c (225177) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)sys_generic.c 8.5 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)sys_generic.c 8.5 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/sys_generic.c 224910 2011-08-16 14:14:56Z jonathan $"); | 38__FBSDID("$FreeBSD: head/sys/kern/sys_generic.c 225177 2011-08-25 15:51:54Z attilio $"); |
39 40#include "opt_capsicum.h" 41#include "opt_compat.h" 42#include "opt_ktrace.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/sysproto.h> --- 1438 unchanged lines hidden (view full) --- 1485 STAILQ_REMOVE(&stp->st_selq, sfp, selfd, sf_link); 1486 mtx_lock(sfp->sf_mtx); 1487 if (sfp->sf_si) 1488 TAILQ_REMOVE(&sfp->sf_si->si_tdlist, sfp, sf_threads); 1489 mtx_unlock(sfp->sf_mtx); 1490 uma_zfree(selfd_zone, sfp); 1491} 1492 | 39 40#include "opt_capsicum.h" 41#include "opt_compat.h" 42#include "opt_ktrace.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/sysproto.h> --- 1438 unchanged lines hidden (view full) --- 1485 STAILQ_REMOVE(&stp->st_selq, sfp, selfd, sf_link); 1486 mtx_lock(sfp->sf_mtx); 1487 if (sfp->sf_si) 1488 TAILQ_REMOVE(&sfp->sf_si->si_tdlist, sfp, sf_threads); 1489 mtx_unlock(sfp->sf_mtx); 1490 uma_zfree(selfd_zone, sfp); 1491} 1492 |
1493/* Drain the waiters tied to all the selfd belonging the specified selinfo. */ 1494void 1495seldrain(sip) 1496 struct selinfo *sip; 1497{ 1498 1499 /* 1500 * This feature is already provided by doselwakeup(), thus it is 1501 * enough to go for it. 1502 * Eventually, the context, should take care to avoid races 1503 * between thread calling select()/poll() and file descriptor 1504 * detaching, but, again, the races are just the same as 1505 * selwakeup(). 1506 */ 1507 doselwakeup(sip, -1); 1508} 1509 |
|
1493/* 1494 * Record a select request. 1495 */ 1496void 1497selrecord(selector, sip) 1498 struct thread *selector; 1499 struct selinfo *sip; 1500{ --- 183 unchanged lines hidden --- | 1510/* 1511 * Record a select request. 1512 */ 1513void 1514selrecord(selector, sip) 1515 struct thread *selector; 1516 struct selinfo *sip; 1517{ --- 183 unchanged lines hidden --- |