* [PATCH 4/7] ALPHA: "prctl" macros
@ 2007-04-11 8:29 Ivan Kokshaysky
0 siblings, 0 replies; only message in thread
From: Ivan Kokshaysky @ 2007-04-11 8:29 UTC (permalink / raw)
To: Andrew Morton; +Cc: Richard Henderson, Jay Estabrook, linux-kernel
Files:
include/asm-alpha/thread_info.h
Provide "prctl" macros for ALPHA.
Signed-off-by: Jay Estabrook <jay.estabrook@hp.com>
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
---
diff -Naurp a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h
--- a/include/asm-alpha/thread_info.h 2007-02-04 13:44:54.000000000 -0500
+++ b/include/asm-alpha/thread_info.h 2007-03-19 14:57:30.000000000 -0400
@@ -92,5 +92,27 @@ register struct thread_info *__current_t
#define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \
| _TIF_SYSCALL_TRACE)
+#define ALPHA_UAC_SHIFT 6
+#define ALPHA_UAC_MASK (1 << TIF_UAC_NOPRINT | 1 << TIF_UAC_NOFIX | \
+ 1 << TIF_UAC_SIGBUS)
+
+#define SET_UNALIGN_CTL(task,value) ({ \
+ (task)->thread_info->flags = (((task)->thread_info->flags & \
+ ~ALPHA_UAC_MASK) \
+ | (((value) << ALPHA_UAC_SHIFT) & (1<<TIF_UAC_NOPRINT))\
+ | (((value) << (ALPHA_UAC_SHIFT + 1)) & (1<<TIF_UAC_SIGBUS)) \
+ | (((value) << (ALPHA_UAC_SHIFT - 1)) & (1<<TIF_UAC_NOFIX)));\
+ 0; })
+
+#define GET_UNALIGN_CTL(task,value) ({ \
+ put_user(((task)->thread_info->flags & (1 << TIF_UAC_NOPRINT)) \
+ >> ALPHA_UAC_SHIFT \
+ | ((task)->thread_info->flags & (1 << TIF_UAC_SIGBUS)) \
+ >> (ALPHA_UAC_SHIFT + 1) \
+ | ((task)->thread_info->flags & (1 << TIF_UAC_NOFIX)) \
+ >> (ALPHA_UAC_SHIFT - 1), \
+ (int __user *)(value)); \
+ })
+
#endif /* __KERNEL__ */
#endif /* _ALPHA_THREAD_INFO_H */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-04-11 8:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-11 8:29 [PATCH 4/7] ALPHA: "prctl" macros Ivan Kokshaysky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®