sys_generic.c (d6f724898368f8a55757aa5d7d443f90f558c17a) | sys_generic.c (6aba400a7055ed2427c6aa297774fb91f5d8db79) |
---|---|
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. --- 1476 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 | 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. --- 1476 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 --- |