aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-alpha
diff options
context:
space:
mode:
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>2007-05-06 17:50:38 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:12:58 -0400
commited58a593dcf6bb9853f711e56f8618f84b7b8cb2 (patch)
treed05b03882c94f009dc388102082e1842f7a08d35 /include/asm-alpha
parenteb2bce7f5e7ac1ca6da434461217fadf3c688d2c (diff)
ALPHA: "prctl" macros
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> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-alpha')
-rw-r--r--include/asm-alpha/thread_info.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h
index 69ffd93f8e22..eeb3bef91e11 100644
--- a/include/asm-alpha/thread_info.h
+++ b/include/asm-alpha/thread_info.h
@@ -92,5 +92,27 @@ register struct thread_info *__current_thread_info __asm__("$8");
92#define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \ 92#define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \
93 | _TIF_SYSCALL_TRACE) 93 | _TIF_SYSCALL_TRACE)
94 94
95#define ALPHA_UAC_SHIFT 6
96#define ALPHA_UAC_MASK (1 << TIF_UAC_NOPRINT | 1 << TIF_UAC_NOFIX | \
97 1 << TIF_UAC_SIGBUS)
98
99#define SET_UNALIGN_CTL(task,value) ({ \
100 (task)->thread_info->flags = (((task)->thread_info->flags & \
101 ~ALPHA_UAC_MASK) \
102 | (((value) << ALPHA_UAC_SHIFT) & (1<<TIF_UAC_NOPRINT))\
103 | (((value) << (ALPHA_UAC_SHIFT + 1)) & (1<<TIF_UAC_SIGBUS)) \
104 | (((value) << (ALPHA_UAC_SHIFT - 1)) & (1<<TIF_UAC_NOFIX)));\
105 0; })
106
107#define GET_UNALIGN_CTL(task,value) ({ \
108 put_user(((task)->thread_info->flags & (1 << TIF_UAC_NOPRINT)) \
109 >> ALPHA_UAC_SHIFT \
110 | ((task)->thread_info->flags & (1 << TIF_UAC_SIGBUS)) \
111 >> (ALPHA_UAC_SHIFT + 1) \
112 | ((task)->thread_info->flags & (1 << TIF_UAC_NOFIX)) \
113 >> (ALPHA_UAC_SHIFT - 1), \
114 (int __user *)(value)); \
115 })
116
95#endif /* __KERNEL__ */ 117#endif /* __KERNEL__ */
96#endif /* _ALPHA_THREAD_INFO_H */ 118#endif /* _ALPHA_THREAD_INFO_H */