diff options
Diffstat (limited to 'include/linux/sched.h')
| -rw-r--r-- | include/linux/sched.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 03c238088aee..698b5a4d25a7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1977,6 +1977,11 @@ static inline void clear_tsk_need_resched(struct task_struct *tsk) | |||
| 1977 | clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); | 1977 | clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); |
| 1978 | } | 1978 | } |
| 1979 | 1979 | ||
| 1980 | static inline int test_tsk_need_resched(struct task_struct *tsk) | ||
| 1981 | { | ||
| 1982 | return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); | ||
| 1983 | } | ||
| 1984 | |||
| 1980 | static inline int signal_pending(struct task_struct *p) | 1985 | static inline int signal_pending(struct task_struct *p) |
| 1981 | { | 1986 | { |
| 1982 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); | 1987 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); |
| @@ -1991,7 +1996,7 @@ static inline int fatal_signal_pending(struct task_struct *p) | |||
| 1991 | 1996 | ||
| 1992 | static inline int need_resched(void) | 1997 | static inline int need_resched(void) |
| 1993 | { | 1998 | { |
| 1994 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); | 1999 | return unlikely(test_tsk_need_resched(current)); |
| 1995 | } | 2000 | } |
| 1996 | 2001 | ||
| 1997 | /* | 2002 | /* |
