Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145861
b: refs/heads/master
c: a72188d
h: refs/heads/master
i:
  145859: b7c9889
v: v3
  • Loading branch information
Darren Hart authored and Thomas Gleixner committed Apr 6, 2009
1 parent 75aee7b commit e9aea99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8dac456a681bd94272ff50ecb31be6b669382c2b
refs/heads/master: a72188d8a64ebe74722f1cf7ffac41b41ffdba21
12 changes: 8 additions & 4 deletions trunk/kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,7 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
*/
#define FLAGS_SHARED 0x01
#define FLAGS_CLOCKRT 0x02
#define FLAGS_HAS_TIMEOUT 0x04

static long futex_wait_restart(struct restart_block *restart);

Expand Down Expand Up @@ -1486,7 +1487,7 @@ static int futex_wait(u32 __user *uaddr, int fshared,
restart->futex.val = val;
restart->futex.time = abs_time->tv64;
restart->futex.bitset = bitset;
restart->futex.flags = 0;
restart->futex.flags = FLAGS_HAS_TIMEOUT;

if (fshared)
restart->futex.flags |= FLAGS_SHARED;
Expand All @@ -1510,13 +1511,16 @@ static long futex_wait_restart(struct restart_block *restart)
{
u32 __user *uaddr = (u32 __user *)restart->futex.uaddr;
int fshared = 0;
ktime_t t;
ktime_t t, *tp = NULL;

t.tv64 = restart->futex.time;
if (restart->futex.flags & FLAGS_HAS_TIMEOUT) {
t.tv64 = restart->futex.time;
tp = &t;
}
restart->fn = do_no_restart_syscall;
if (restart->futex.flags & FLAGS_SHARED)
fshared = 1;
return (long)futex_wait(uaddr, fshared, restart->futex.val, &t,
return (long)futex_wait(uaddr, fshared, restart->futex.val, tp,
restart->futex.bitset,
restart->futex.flags & FLAGS_CLOCKRT);
}
Expand Down

0 comments on commit e9aea99

Please sign in to comment.