Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee761f62 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

arch: Consolidate tsk_is_polling()



Move it to a common place. Preparatory patch for implementing
set/clear for the idle need_resched poll implementation.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: default avatarCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Link: http://lkml.kernel.org/r/20130321215233.446034505@linutronix.de


Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 6546327a
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -95,8 +95,6 @@ register struct thread_info *__current_thread_info __asm__("$8");
#define TS_POLLING		0x0010	/* idle task polling need_resched,
					   skip sending interrupt */

#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)

#ifndef __ASSEMBLY__
#define HAVE_SET_RESTORE_SIGMASK	1
static inline void set_restore_sigmask(void)
+0 −2
Original line number Diff line number Diff line
@@ -131,8 +131,6 @@ struct thread_info {
#define TS_POLLING		1 	/* true if in idle loop and not sleeping */
#define TS_RESTORE_SIGMASK	2	/* restore signal mask in do_signal() */

#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)

#ifndef __ASSEMBLY__
#define HAVE_SET_RESTORE_SIGMASK	1
static inline void set_restore_sigmask(void)
+0 −2
Original line number Diff line number Diff line
@@ -150,6 +150,4 @@ static inline int kstack_end(void *addr)
#define _TIF_WORK_MASK		(_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \
				 _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP))

#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)

#endif /* _ASM_THREAD_INFO_H */
+0 −1
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@ static inline bool test_and_clear_restore_sigmask(void)
	ti->status &= ~TS_RESTORE_SIGMASK;
	return true;
}
#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
#endif

#endif /* __KERNEL__ */
+0 −2
Original line number Diff line number Diff line
@@ -165,8 +165,6 @@ void arch_release_thread_info(struct thread_info *ti);
#define _TIF_WORK_MASK		0x0000FFFE	/* work to do on interrupt/exception return */
#define _TIF_ALLWORK_MASK	0x0000FFFF	/* work to do on any return to u-space */

#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)

#endif /* __KERNEL__ */

#endif /* _ASM_THREAD_INFO_H */
Loading