Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/sched.h
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
#include <asm/atomic.h> | #include <asm/atomic.h> | ||||
#define MAX_SCHEDULE_TIMEOUT INT_MAX | #define MAX_SCHEDULE_TIMEOUT INT_MAX | ||||
#define TASK_RUNNING 0x0000 | #define TASK_RUNNING 0x0000 | ||||
#define TASK_INTERRUPTIBLE 0x0001 | #define TASK_INTERRUPTIBLE 0x0001 | ||||
#define TASK_UNINTERRUPTIBLE 0x0002 | #define TASK_UNINTERRUPTIBLE 0x0002 | ||||
#define TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE) | #define TASK_PARKED 0x0040 | ||||
#define TASK_WAKING 0x0100 | #define TASK_WAKEKILL 0x0100 | ||||
#define TASK_PARKED 0x0200 | #define TASK_WAKING 0x0200 | ||||
#define TASK_KILLABLE (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE) | |||||
#define TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE | TASK_KILLABLE) | |||||
#define TASK_COMM_LEN (MAXCOMLEN + 1) | #define TASK_COMM_LEN (MAXCOMLEN + 1) | ||||
struct task_struct { | struct task_struct { | ||||
struct thread *task_thread; | struct thread *task_thread; | ||||
struct mm_struct *mm; | struct mm_struct *mm; | ||||
linux_task_fn_t *task_fn; | linux_task_fn_t *task_fn; | ||||
void *task_data; | void *task_data; | ||||
int task_ret; | int task_ret; | ||||
Show All 15 Lines | #define current ({ \ | ||||
struct thread *__td = curthread; \ | struct thread *__td = curthread; \ | ||||
linux_set_current(__td); \ | linux_set_current(__td); \ | ||||
((struct task_struct *)__td->td_lkpi_task); \ | ((struct task_struct *)__td->td_lkpi_task); \ | ||||
}) | }) | ||||
#define task_pid_group_leader(task) (task)->task_thread->td_proc->p_pid | #define task_pid_group_leader(task) (task)->task_thread->td_proc->p_pid | ||||
#define task_pid(task) ((task)->pid) | #define task_pid(task) ((task)->pid) | ||||
#define task_pid_nr(task) ((task)->pid) | #define task_pid_nr(task) ((task)->pid) | ||||
#define task_pid_vnr(task) ((task)->pid) | |||||
#define get_pid(x) (x) | #define get_pid(x) (x) | ||||
#define put_pid(x) do { } while (0) | #define put_pid(x) do { } while (0) | ||||
#define current_euid() (curthread->td_ucred->cr_uid) | #define current_euid() (curthread->td_ucred->cr_uid) | ||||
#define set_task_state(task, x) atomic_set(&(task)->state, (x)) | #define set_task_state(task, x) atomic_set(&(task)->state, (x)) | ||||
#define __set_task_state(task, x) ((task)->state.counter = (x)) | #define __set_task_state(task, x) ((task)->state.counter = (x)) | ||||
#define set_current_state(x) set_task_state(current, x) | #define set_current_state(x) set_task_state(current, x) | ||||
#define __set_current_state(x) __set_task_state(current, x) | #define __set_current_state(x) __set_task_state(current, x) | ||||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |