diff options
author | Roland McGrath <roland@redhat.com> | 2008-04-30 17:40:14 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-05-01 17:29:44 -0400 |
commit | 848376c774a941c29e4fa083d96d84a5f2190857 (patch) | |
tree | 190ded9079f7de75018e9d89049e65b62c239151 /include | |
parent | c0cd661b1b0ad83dac54420169ec9ca14df409e9 (diff) |
[IA64] TS_RESTORE_SIGMASK
Replace TIF_RESTORE_SIGMASK with TS_RESTORE_SIGMASK and define
our own set_restore_sigmask() function. This saves the costly
SMP-safe set_bit operation, which we do not need for the sigmask
flag since TIF_SIGPENDING always has to be set too.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/thread_info.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index f30e05583869..2422ac61658a 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -108,13 +108,11 @@ extern void tsk_clear_notify_resume(struct task_struct *tsk); | |||
108 | #define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ | 108 | #define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ |
109 | #define TIF_FREEZE 20 /* is freezing for suspend */ | 109 | #define TIF_FREEZE 20 /* is freezing for suspend */ |
110 | #define TIF_RESTORE_RSE 21 /* user RBS is newer than kernel RBS */ | 110 | #define TIF_RESTORE_RSE 21 /* user RBS is newer than kernel RBS */ |
111 | #define TIF_RESTORE_SIGMASK 22 /* restore signal mask in do_signal() */ | ||
112 | 111 | ||
113 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 112 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
114 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 113 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
115 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 114 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
116 | #define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP) | 115 | #define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP) |
117 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
118 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 116 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
119 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 117 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
120 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 118 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
@@ -131,7 +129,18 @@ extern void tsk_clear_notify_resume(struct task_struct *tsk); | |||
131 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) | 129 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) |
132 | 130 | ||
133 | #define TS_POLLING 1 /* true if in idle loop and not sleeping */ | 131 | #define TS_POLLING 1 /* true if in idle loop and not sleeping */ |
132 | #define TS_RESTORE_SIGMASK 2 /* restore signal mask in do_signal() */ | ||
134 | 133 | ||
135 | #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING) | 134 | #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING) |
136 | 135 | ||
136 | #ifndef __ASSEMBLY__ | ||
137 | #define HAVE_SET_RESTORE_SIGMASK 1 | ||
138 | static inline void set_restore_sigmask(void) | ||
139 | { | ||
140 | struct thread_info *ti = current_thread_info(); | ||
141 | ti->status |= TS_RESTORE_SIGMASK; | ||
142 | set_bit(TIF_SIGPENDING, &ti->flags); | ||
143 | } | ||
144 | #endif /* !__ASSEMBLY__ */ | ||
145 | |||
137 | #endif /* _ASM_IA64_THREAD_INFO_H */ | 146 | #endif /* _ASM_IA64_THREAD_INFO_H */ |