Skip to content

Commit

Permalink
ALPHA: "prctl" macros
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ivan Kokshaysky authored and Linus Torvalds committed May 7, 2007
1 parent eb2bce7 commit ed58a59
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions include/asm-alpha/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit ed58a59

Please sign in to comment.