Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ed58a593dcf6bb9853f711e56f8618f84b7b8cb2
Commit:     ed58a593dcf6bb9853f711e56f8618f84b7b8cb2
Parent:     eb2bce7f5e7ac1ca6da434461217fadf3c688d2c
Author:     Ivan Kokshaysky <[EMAIL PROTECTED]>
AuthorDate: Sun May 6 14:50:38 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon May 7 12:12:58 2007 -0700

    ALPHA: "prctl" macros
    
    Files:
    
    include/asm-alpha/thread_info.h
    
        Provide "prctl" macros for ALPHA.
    
    Signed-off-by: Jay Estabrook <[EMAIL PROTECTED]>
    Signed-off-by: Ivan Kokshaysky <[EMAIL PROTECTED]>
    Cc: Richard Henderson <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/asm-alpha/thread_info.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h
index 69ffd93..eeb3bef 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");
 #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 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to