diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-13 01:45:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-13 01:45:15 -0400 |
commit | 9a28dbf8af11d127bf1c644143e7882cb91515dd (patch) | |
tree | 533dfbec4fca25330956d54094cae3dbd6a8d675 /include | |
parent | faa6cfde747ba6d37a0889cbe85881c80806d355 (diff) |
sparc64: Use a TS_RESTORE_SIGMASK
This mirrors x86 changeset 5a8da0ea82db6fa9737041381079fd16f25dcce2
("signals: x86 TS_RESTORE_SIGMASK") on sparc64.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sparc64/thread_info.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h index 71e42d1a80d9..e5873e385306 100644 --- a/include/asm-sparc64/thread_info.h +++ b/include/asm-sparc64/thread_info.h | |||
@@ -38,7 +38,7 @@ struct thread_info { | |||
38 | struct task_struct *task; | 38 | struct task_struct *task; |
39 | unsigned long flags; | 39 | unsigned long flags; |
40 | __u8 fpsaved[7]; | 40 | __u8 fpsaved[7]; |
41 | __u8 pad; | 41 | __u8 status; |
42 | unsigned long ksp; | 42 | unsigned long ksp; |
43 | 43 | ||
44 | /* D$ line 2 */ | 44 | /* D$ line 2 */ |
@@ -217,7 +217,7 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
217 | * nop | 217 | * nop |
218 | */ | 218 | */ |
219 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 219 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
220 | #define TIF_RESTORE_SIGMASK 1 /* restore signal mask in do_signal() */ | 220 | /* flags bit 1 is available */ |
221 | #define TIF_SIGPENDING 2 /* signal pending */ | 221 | #define TIF_SIGPENDING 2 /* signal pending */ |
222 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 222 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
223 | #define TIF_PERFCTR 4 /* performance counters active */ | 223 | #define TIF_PERFCTR 4 /* performance counters active */ |
@@ -244,14 +244,34 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
244 | #define _TIF_32BIT (1<<TIF_32BIT) | 244 | #define _TIF_32BIT (1<<TIF_32BIT) |
245 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 245 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
246 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 246 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
247 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
248 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | 247 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) |
249 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 248 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
250 | 249 | ||
251 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ | 250 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ |
252 | (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | \ | 251 | (_TIF_SIGPENDING | \ |
253 | _TIF_NEED_RESCHED | _TIF_PERFCTR)) | 252 | _TIF_NEED_RESCHED | _TIF_PERFCTR)) |
254 | 253 | ||
254 | /* | ||
255 | * Thread-synchronous status. | ||
256 | * | ||
257 | * This is different from the flags in that nobody else | ||
258 | * ever touches our thread-synchronous status, so we don't | ||
259 | * have to worry about atomic accesses. | ||
260 | * | ||
261 | * Note that there are only 8 bits available. | ||
262 | */ | ||
263 | #define TS_RESTORE_SIGMASK 0x0001 /* restore signal mask in do_signal() */ | ||
264 | |||
265 | #ifndef __ASSEMBLY__ | ||
266 | #define HAVE_SET_RESTORE_SIGMASK 1 | ||
267 | static inline void set_restore_sigmask(void) | ||
268 | { | ||
269 | struct thread_info *ti = current_thread_info(); | ||
270 | ti->status |= TS_RESTORE_SIGMASK; | ||
271 | set_bit(TIF_SIGPENDING, &ti->flags); | ||
272 | } | ||
273 | #endif /* !__ASSEMBLY__ */ | ||
274 | |||
255 | #endif /* __KERNEL__ */ | 275 | #endif /* __KERNEL__ */ |
256 | 276 | ||
257 | #endif /* _ASM_THREAD_INFO_H */ | 277 | #endif /* _ASM_THREAD_INFO_H */ |