···7979#define TIF_SIGPENDING 2 /* signal pending */8080#define TIF_NEED_RESCHED 3 /* rescheduling necessary */8181#define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */8282+#define TIF_NOTIFY_SIGNAL 5 /* signal notifications exist */8283#define TIF_SYSCALL_TRACE 15 /* syscall trace active */83848485/* true if poll_idle() is polling TIF_NEED_RESCHED */···9089#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)9190#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)9291#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)9292+#define _TIF_NOTIFY_SIGNAL (1<<TIF_NOTIFY_SIGNAL)9393#define _TIF_MEMDIE (1<<TIF_MEMDIE)94949595/* work to do on interrupt/exception return */9696#define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \9797- _TIF_NOTIFY_RESUME)9797+ _TIF_NOTIFY_RESUME | _TIF_NOTIFY_SIGNAL)98989999/*100100 * _TIF_ALLWORK_MASK includes SYSCALL_TRACE, but we don't need it.
+2-1
arch/arc/kernel/entry.S
···307307 mov r0, sp ; pt_regs for arg to do_signal()/do_notify_resume()308308309309 GET_CURR_THR_INFO_FLAGS r9310310- bbit0 r9, TIF_SIGPENDING, .Lchk_notify_resume310310+ and.f 0, r9, TIF_SIGPENDING|TIF_NOTIFY_SIGNAL311311+ bz .Lchk_notify_resume311312312313 ; Normal Trap/IRQ entry only saves Scratch (caller-saved) regs313314 ; in pt_reg since the "C" ABI (kernel code) will automatically
+1-1
arch/arc/kernel/signal.c
···362362363363 restart_scall = in_syscall(regs) && syscall_restartable(regs);364364365365- if (get_signal(&ksig)) {365365+ if (test_thread_flag(TIF_SIGPENDING) && get_signal(&ksig)) {366366 if (restart_scall) {367367 arc_restart_syscall(&ksig.ka, regs);368368 syscall_wont_restart(regs); /* No more restarts */