aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/thread_info.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-02-03 02:29:41 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2008-02-03 02:30:32 -0500
commitc1f3ee120bb61045b1c0a3ead620d1d65af47130 (patch)
tree908430bf2b47fe8e96ac623ae7ab6dd5698d0938 /include/linux/thread_info.h
parente619a75ff6201b567a539e787aa9af9bc63a3187 (diff)
parent9135f1901ee6449dfe338adf6e40e9c2025b8150 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include/linux/thread_info.h')
-rw-r--r--include/linux/thread_info.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index 1c4eb41dbd89..421323e5a2d6 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -7,12 +7,26 @@
7#ifndef _LINUX_THREAD_INFO_H 7#ifndef _LINUX_THREAD_INFO_H
8#define _LINUX_THREAD_INFO_H 8#define _LINUX_THREAD_INFO_H
9 9
10#include <linux/types.h>
11
10/* 12/*
11 * System call restart block. 13 * System call restart block.
12 */ 14 */
13struct restart_block { 15struct restart_block {
14 long (*fn)(struct restart_block *); 16 long (*fn)(struct restart_block *);
15 unsigned long arg0, arg1, arg2, arg3; 17 union {
18 struct {
19 unsigned long arg0, arg1, arg2, arg3;
20 };
21 /* For futex_wait */
22 struct {
23 u32 *uaddr;
24 u32 val;
25 u32 flags;
26 u32 bitset;
27 u64 time;
28 } futex;
29 };
16}; 30};
17 31
18extern long do_no_restart_syscall(struct restart_block *parm); 32extern long do_no_restart_syscall(struct restart_block *parm);
@@ -29,27 +43,27 @@ extern long do_no_restart_syscall(struct restart_block *parm);
29 43
30static inline void set_ti_thread_flag(struct thread_info *ti, int flag) 44static inline void set_ti_thread_flag(struct thread_info *ti, int flag)
31{ 45{
32 set_bit(flag,&ti->flags); 46 set_bit(flag, (unsigned long *)&ti->flags);
33} 47}
34 48
35static inline void clear_ti_thread_flag(struct thread_info *ti, int flag) 49static inline void clear_ti_thread_flag(struct thread_info *ti, int flag)
36{ 50{
37 clear_bit(flag,&ti->flags); 51 clear_bit(flag, (unsigned long *)&ti->flags);
38} 52}
39 53
40static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) 54static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
41{ 55{
42 return test_and_set_bit(flag,&ti->flags); 56 return test_and_set_bit(flag, (unsigned long *)&ti->flags);
43} 57}
44 58
45static inline int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag) 59static inline int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
46{ 60{
47 return test_and_clear_bit(flag,&ti->flags); 61 return test_and_clear_bit(flag, (unsigned long *)&ti->flags);
48} 62}
49 63
50static inline int test_ti_thread_flag(struct thread_info *ti, int flag) 64static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
51{ 65{
52 return test_bit(flag,&ti->flags); 66 return test_bit(flag, (unsigned long *)&ti->flags);
53} 67}
54 68
55#define set_thread_flag(flag) \ 69#define set_thread_flag(flag) \