1#ifndef __LINUX_SCHED_H__
2#define __LINUX_SCHED_H__
48#include <linux/kernel.h>
85#define TASK_INTERRUPTIBLE 1
86#define TASK_UNINTERRUPTIBLE 2
87#define TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE)
88#define TASK_WAKEKILL 4
89#define __TASK_STOPPED 8
93#define MAX_SCHEDULE_TIMEOUT ((long)(~0UL >> 1))
102#define PF_KTHREAD 0x00200000U
147#define current (dcl_current())
167static inline int task_pid_vnr(
struct task_struct* tsk)
169 return tsk ? tsk->
pid : 0;
182static inline char* get_task_comm(
char* buf,
struct task_struct* tsk)
186 for (i = 0; i + 1 <
sizeof(tsk->
comm) && tsk->
comm[i]; i++)
187 buf[i] = tsk->
comm[i];
212static inline int wake_up_process(
struct task_struct* tsk)
241#define set_current_state(s) do { (void)(s); } while (0)
242#define __set_current_state(s) do { (void)(s); } while (0)
243#define set_task_state(t, s) do { (void)(t); (void)(s); } while (0)
244#define __set_task_state(t, s) do { (void)(t); (void)(s); } while (0)
262#ifndef signal_pending
283#define cond_resched() ((void)0)
306long schedule_timeout_interruptible(
long timeout);
#define DCL_LOCK_GUARD(name, type, acquire, release)
Definition cleanup.h:168
void task_lock(struct task_struct *p)
long schedule_timeout_killable(long timeout)
long schedule_timeout(long timeout)
void task_unlock(struct task_struct *p)
int fatal_signal_pending(struct task_struct *tsk)
@ TASK_COMM_LEN
Definition sched.h:118
struct task_struct * dcl_current(void)
#define signal_pending(p)
Definition mm.h:87
struct tty_struct * tty
Definition sched.h:108
unsigned int flags
Definition sched.h:125
void * worker_private
Definition sched.h:126
char comm[TASK_COMM_LEN]
Definition sched.h:122
int pid
Definition sched.h:123
struct signal_struct * signal
Definition sched.h:124