设置进程p的thread_info中的flag域的TIF_NEED_RESCHED位,表示该进程需要调用调度程序执行进程切换
static
inline
void
resched_task(task_t
*
p)
{
set_tsk_need_resched(p);
}
static
inline
void
set_tsk_need_resched(
struct
task_struct
*
tsk)
{
set_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
}
static
inline
void
set_tsk_thread_flag(
struct
task_struct
*
tsk,
int
flag)
{
set_ti_thread_flag(tsk->thread_info,flag);
}
static
inline
void
set_ti_thread_flag(
struct
thread_info
*
ti,
int
flag)
{
set_bit(flag,&ti->flags);
}
#define TIF_NEED_RESCHED 3
struct thread_info {
...
unsigned long flags;
...
};
















#define TIF_NEED_RESCHED 3
struct thread_info {
...
unsigned long flags;
...
};