|
FreeBSD kernel kern code
|
#include <sys/cdefs.h>#include "opt_sched.h"#include <sys/param.h>#include <sys/systm.h>#include <sys/kdb.h>#include <sys/kernel.h>#include <sys/ktr.h>#include <sys/lock.h>#include <sys/mutex.h>#include <sys/proc.h>#include <sys/queue.h>#include <sys/sched.h>#include <sys/smp.h>#include <sys/sysctl.h>#include <machine/cpu.h>
Go to the source code of this file.
Macros | |
| #define | KTR_CRITICAL 0 |
Functions | |
| __FBSDID ("$BSDSUniX$") | |
| CTASSERT ((RQB_BPW *RQB_LEN)==RQ_NQS) | |
| SYSCTL_INT (_kern_sched, OID_AUTO, preemption, CTLFLAG_RD,&kern_sched_preemption, 0,"Kernel preemption enabled") | |
| struct thread * | choosethread (void) |
| void | critical_enter (void) |
| void | critical_exit (void) |
| void | runq_init (struct runq *rq) |
| static __inline void | runq_clrbit (struct runq *rq, int pri) |
| static __inline int | runq_findbit (struct runq *rq) |
| static __inline int | runq_findbit_from (struct runq *rq, u_char pri) |
| static __inline void | runq_setbit (struct runq *rq, int pri) |
| void | runq_add (struct runq *rq, struct thread *td, int flags) |
| void | runq_add_pri (struct runq *rq, struct thread *td, u_char pri, int flags) |
| int | runq_check (struct runq *rq) |
| struct thread * | runq_choose_fuzz (struct runq *rq, int fuzz) |
| struct thread * | runq_choose (struct runq *rq) |
| struct thread * | runq_choose_from (struct runq *rq, u_char idx) |
| void | runq_remove (struct runq *rq, struct thread *td) |
| void | runq_remove_idx (struct runq *rq, struct thread *td, u_char *idx) |
Variables | |
| static int | kern_sched_preemption = 0 |
| #define KTR_CRITICAL 0 |
Definition at line 52 of file kern_switch.c.
Referenced by critical_enter(), and critical_exit().
| __FBSDID | ( | "$BSDSUniX$" | ) |
| struct thread* choosethread | ( | void | ) |
Definition at line 154 of file kern_switch.c.
References panicstr, and sched_choose().
Referenced by sched_switch(), and sched_throw().


| void critical_enter | ( | void | ) |
Definition at line 181 of file kern_switch.c.
References KTR_CRITICAL.
Referenced by _rm_rlock_hard(), configtimer(), get_thread_cputime(), intr_event_handle(), malloc_type_freed(), malloc_type_zone_allocated(), panic(), and rtp_to_pri().

| void critical_exit | ( | void | ) |
Definition at line 192 of file kern_switch.c.
References kdb_active, KTR_CRITICAL, and mi_switch().
Referenced by _rm_rlock_hard(), _rm_unlock_hard(), configtimer(), get_thread_cputime(), intr_event_handle(), malloc_type_freed(), malloc_type_zone_allocated(), panic(), and rtp_to_pri().


| CTASSERT | ( | (RQB_BPW *RQB_LEN) | = =RQ_NQS | ) |
| void runq_add | ( | struct runq * | rq, |
| struct thread * | td, | ||
| int | flags | ||
| ) |
Definition at line 332 of file kern_switch.c.
References runq_setbit().
Referenced by sched_add(), and tdq_runq_add().


| void runq_add_pri | ( | struct runq * | rq, |
| struct thread * | td, | ||
| u_char | pri, | ||
| int | flags | ||
| ) |
Definition at line 351 of file kern_switch.c.
References runq_setbit().
Referenced by tdq_runq_add().


| int runq_check | ( | struct runq * | rq | ) |
Definition at line 373 of file kern_switch.c.
Referenced by sched_runnable().

| struct thread* runq_choose | ( | struct runq * | rq | ) |
Definition at line 436 of file kern_switch.c.
References runq_findbit().
Referenced by sched_choose(), and tdq_choose().


| struct thread* runq_choose_from | ( | struct runq * | rq, |
| u_char | idx | ||
| ) |
Definition at line 456 of file kern_switch.c.
References runq_findbit_from().
Referenced by tdq_choose().


| struct thread* runq_choose_fuzz | ( | struct runq * | rq, |
| int | fuzz | ||
| ) |
Definition at line 394 of file kern_switch.c.
References count, and runq_findbit().
Referenced by sched_choose().


|
static |
Definition at line 243 of file kern_switch.c.
Referenced by runq_remove_idx().

|
static |
Definition at line 260 of file kern_switch.c.
Referenced by runq_choose(), and runq_choose_fuzz().

|
static |
Definition at line 279 of file kern_switch.c.
References mask.
Referenced by runq_choose_from().

| void runq_init | ( | struct runq * | rq | ) |
Definition at line 229 of file kern_switch.c.
Referenced by setup_runqs(), and tdq_setup().

| void runq_remove | ( | struct runq * | rq, |
| struct thread * | td | ||
| ) |
Definition at line 481 of file kern_switch.c.
References runq_remove_idx().
Referenced by sched_choose(), sched_rem(), and tdq_runq_rem().


| void runq_remove_idx | ( | struct runq * | rq, |
| struct thread * | td, | ||
| u_char * | idx | ||
| ) |
Definition at line 488 of file kern_switch.c.
References runq_clrbit().
Referenced by runq_remove(), and tdq_runq_rem().


|
static |
Definition at line 315 of file kern_switch.c.
Referenced by runq_add(), and runq_add_pri().

| SYSCTL_INT | ( | _kern_sched | , |
| OID_AUTO | , | ||
| preemption | , | ||
| CTLFLAG_RD | , | ||
| & | kern_sched_preemption, | ||
| 0 | , | ||
| "Kernel preemption enabled" | |||
| ) |
|
static |
Definition at line 71 of file kern_switch.c.