Deleted Added
full compact
kern_poll.c (157815) kern_poll.c (163709)
1/*-
2 * Copyright (c) 2001-2002 Luigi Rizzo
3 *
4 * Supported by: the Xorp Project (www.xorp.org)
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:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2002 Luigi Rizzo
3 *
4 * Supported by: the Xorp Project (www.xorp.org)
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:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/kern/kern_poll.c 157815 2006-04-17 18:20:38Z jhb $");
29__FBSDID("$FreeBSD: head/sys/kern/kern_poll.c 163709 2006-10-26 21:42:22Z jb $");
30
31#include "opt_device_polling.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/socket.h> /* needed by net/if.h */
37#include <sys/sockio.h>

--- 538 unchanged lines hidden (view full) ---

576poll_idle(void)
577{
578 struct thread *td = curthread;
579 struct rtprio rtp;
580
581 rtp.prio = RTP_PRIO_MAX; /* lowest priority */
582 rtp.type = RTP_PRIO_IDLE;
583 mtx_lock_spin(&sched_lock);
30
31#include "opt_device_polling.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/socket.h> /* needed by net/if.h */
37#include <sys/sockio.h>

--- 538 unchanged lines hidden (view full) ---

576poll_idle(void)
577{
578 struct thread *td = curthread;
579 struct rtprio rtp;
580
581 rtp.prio = RTP_PRIO_MAX; /* lowest priority */
582 rtp.type = RTP_PRIO_IDLE;
583 mtx_lock_spin(&sched_lock);
584#ifdef KSE
584 rtp_to_pri(&rtp, td->td_ksegrp);
585 rtp_to_pri(&rtp, td->td_ksegrp);
586#else
587 rtp_to_pri(&rtp, td);
588#endif
585 mtx_unlock_spin(&sched_lock);
586
587 for (;;) {
588 if (poll_in_idle_loop && poll_handlers > 0) {
589 idlepoll_sleeping = 0;
590 ether_poll(poll_each_burst);
591 mtx_lock_spin(&sched_lock);
592 mi_switch(SW_VOL, NULL);

--- 15 unchanged lines hidden ---
589 mtx_unlock_spin(&sched_lock);
590
591 for (;;) {
592 if (poll_in_idle_loop && poll_handlers > 0) {
593 idlepoll_sleeping = 0;
594 ether_poll(poll_each_burst);
595 mtx_lock_spin(&sched_lock);
596 mi_switch(SW_VOL, NULL);

--- 15 unchanged lines hidden ---