diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-10 20:42:53 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-10 20:42:53 -0500 |
commit | 506c10f26c481b7f8ef27c1c79290f68989b2e9e (patch) | |
tree | 03de82e812f00957aa6276dac2fe51c3358e88d7 /fs/xfs/linux-2.6/sv.h | |
parent | e1df957670aef74ffd9a4ad93e6d2c90bf6b4845 (diff) | |
parent | c59765042f53a79a7a65585042ff463b69cb248c (diff) |
Merge commit 'v2.6.29-rc1' into perfcounters/core
Conflicts:
include/linux/kernel_stat.h
Diffstat (limited to 'fs/xfs/linux-2.6/sv.h')
-rw-r--r-- | fs/xfs/linux-2.6/sv.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/fs/xfs/linux-2.6/sv.h b/fs/xfs/linux-2.6/sv.h index 351a8f454bd1..4dfc7c370819 100644 --- a/fs/xfs/linux-2.6/sv.h +++ b/fs/xfs/linux-2.6/sv.h | |||
@@ -32,23 +32,15 @@ typedef struct sv_s { | |||
32 | wait_queue_head_t waiters; | 32 | wait_queue_head_t waiters; |
33 | } sv_t; | 33 | } sv_t; |
34 | 34 | ||
35 | #define SV_FIFO 0x0 /* sv_t is FIFO type */ | 35 | static inline void _sv_wait(sv_t *sv, spinlock_t *lock) |
36 | #define SV_LIFO 0x2 /* sv_t is LIFO type */ | ||
37 | #define SV_PRIO 0x4 /* sv_t is PRIO type */ | ||
38 | #define SV_KEYED 0x6 /* sv_t is KEYED type */ | ||
39 | #define SV_DEFAULT SV_FIFO | ||
40 | |||
41 | |||
42 | static inline void _sv_wait(sv_t *sv, spinlock_t *lock, int state, | ||
43 | unsigned long timeout) | ||
44 | { | 36 | { |
45 | DECLARE_WAITQUEUE(wait, current); | 37 | DECLARE_WAITQUEUE(wait, current); |
46 | 38 | ||
47 | add_wait_queue_exclusive(&sv->waiters, &wait); | 39 | add_wait_queue_exclusive(&sv->waiters, &wait); |
48 | __set_current_state(state); | 40 | __set_current_state(TASK_UNINTERRUPTIBLE); |
49 | spin_unlock(lock); | 41 | spin_unlock(lock); |
50 | 42 | ||
51 | schedule_timeout(timeout); | 43 | schedule(); |
52 | 44 | ||
53 | remove_wait_queue(&sv->waiters, &wait); | 45 | remove_wait_queue(&sv->waiters, &wait); |
54 | } | 46 | } |
@@ -58,13 +50,7 @@ static inline void _sv_wait(sv_t *sv, spinlock_t *lock, int state, | |||
58 | #define sv_destroy(sv) \ | 50 | #define sv_destroy(sv) \ |
59 | /*NOTHING*/ | 51 | /*NOTHING*/ |
60 | #define sv_wait(sv, pri, lock, s) \ | 52 | #define sv_wait(sv, pri, lock, s) \ |
61 | _sv_wait(sv, lock, TASK_UNINTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT) | 53 | _sv_wait(sv, lock) |
62 | #define sv_wait_sig(sv, pri, lock, s) \ | ||
63 | _sv_wait(sv, lock, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT) | ||
64 | #define sv_timedwait(sv, pri, lock, s, svf, ts, rts) \ | ||
65 | _sv_wait(sv, lock, TASK_UNINTERRUPTIBLE, timespec_to_jiffies(ts)) | ||
66 | #define sv_timedwait_sig(sv, pri, lock, s, svf, ts, rts) \ | ||
67 | _sv_wait(sv, lock, TASK_INTERRUPTIBLE, timespec_to_jiffies(ts)) | ||
68 | #define sv_signal(sv) \ | 54 | #define sv_signal(sv) \ |
69 | wake_up(&(sv)->waiters) | 55 | wake_up(&(sv)->waiters) |
70 | #define sv_broadcast(sv) \ | 56 | #define sv_broadcast(sv) \ |