Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/proc.h
Show First 20 Lines • Show All 898 Lines • ▼ Show 20 Lines | |||||
#define SZOMB 5 /* Awaiting collection by parent. */ | #define SZOMB 5 /* Awaiting collection by parent. */ | ||||
#define SWAIT 6 /* Waiting for interrupt. */ | #define SWAIT 6 /* Waiting for interrupt. */ | ||||
#define SLOCK 7 /* Blocked on a lock. */ | #define SLOCK 7 /* Blocked on a lock. */ | ||||
#define P_MAGIC 0xbeefface | #define P_MAGIC 0xbeefface | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
/* Types and flags for mi_switch(). */ | /* Types and flags for mi_switch(9). */ | ||||
#define SW_TYPE_MASK 0xff /* First 8 bits are switch type */ | #define SW_TYPE_MASK 0xff /* First 8 bits are switch type */ | ||||
#define SWT_NONE 0 /* Unspecified switch. */ | #define SWT_OWEPREEMPT 1 /* Switching due to owepreempt. */ | ||||
#define SWT_PREEMPT 1 /* Switching due to preemption. */ | #define SWT_TURNSTILE 2 /* Turnstile contention. */ | ||||
#define SWT_OWEPREEMPT 2 /* Switching due to owepreempt. */ | #define SWT_SLEEPQ 3 /* Sleepq wait. */ | ||||
#define SWT_TURNSTILE 3 /* Turnstile contention. */ | #define SWT_RELINQUISH 4 /* yield call. */ | ||||
#define SWT_SLEEPQ 4 /* Sleepq wait. */ | #define SWT_NEEDRESCHED 5 /* NEEDRESCHED was set. */ | ||||
#define SWT_SLEEPQTIMO 5 /* Sleepq timeout wait. */ | #define SWT_IDLE 6 /* Switching from the idle thread. */ | ||||
#define SWT_RELINQUISH 6 /* yield call. */ | #define SWT_IWAIT 7 /* Waiting for interrupts. */ | ||||
#define SWT_NEEDRESCHED 7 /* NEEDRESCHED was set. */ | #define SWT_SUSPEND 8 /* Thread suspended. */ | ||||
#define SWT_IDLE 8 /* Switching from the idle thread. */ | #define SWT_REMOTEPREEMPT 9 /* Remote processor preempted. */ | ||||
#define SWT_IWAIT 9 /* Waiting for interrupts. */ | #define SWT_REMOTEWAKEIDLE 10 /* Remote processor preempted idle. */ | ||||
#define SWT_SUSPEND 10 /* Thread suspended. */ | #define SWT_BIND 11 /* Thread bound to a new CPU. */ | ||||
#define SWT_REMOTEPREEMPT 11 /* Remote processor preempted. */ | #define SWT_COUNT 12 /* Number of switch types. */ | ||||
#define SWT_REMOTEWAKEIDLE 12 /* Remote processor preempted idle. */ | |||||
#define SWT_COUNT 13 /* Number of switch types. */ | |||||
/* Flags */ | /* Flags */ | ||||
#define SW_VOL 0x0100 /* Voluntary switch. */ | #define SW_VOL 0x0100 /* Voluntary switch. */ | ||||
#define SW_INVOL 0x0200 /* Involuntary switch. */ | #define SW_INVOL 0x0200 /* Involuntary switch. */ | ||||
#define SW_PREEMPT 0x0400 /* The invol switch is a preemption */ | #define SW_PREEMPT 0x0400 /* The invol switch is a preemption */ | ||||
/* How values for thread_single(). */ | /* How values for thread_single(). */ | ||||
#define SINGLE_NO_EXIT 0 | #define SINGLE_NO_EXIT 0 | ||||
#define SINGLE_EXIT 1 | #define SINGLE_EXIT 1 | ||||
▲ Show 20 Lines • Show All 427 Lines • Show Last 20 Lines |