diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2006-02-01 03:06:12 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 08:53:21 -0800 |
commit | 9a5e7339908d7d718ebc4149b77eee06291bdb95 (patch) | |
tree | c4de6c51b7e9783fb32948539f6b6b09139bc8f5 /arch/alpha/kernel/entry.S | |
parent | 975b3d3d5b983eb60706d35f0d24cd19f6badabf (diff) | |
download | talos-op-linux-9a5e7339908d7d718ebc4149b77eee06291bdb95.tar.gz talos-op-linux-9a5e7339908d7d718ebc4149b77eee06291bdb95.zip |
[PATCH] alpha: Fix getxpid on alpha so it works for threads
While looking in the code I discovered that alpha has fallen behind because
it doesn't use sys_getppid. The problem is that it doesn't follow the task
struct to the task_group_leader.
Acked-by: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/alpha/kernel/entry.S')
-rw-r--r-- | arch/alpha/kernel/entry.S | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index e38671c922bc..7af15bf7e5ab 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -879,17 +879,19 @@ sys_getxpid: /* See linux/kernel/timer.c sys_getppid for discussion about this loop. */ - ldq $3, TASK_REAL_PARENT($2) -1: ldl $1, TASK_TGID($3) + ldq $3, TASK_GROUP_LEADER($2) + ldq $4, TASK_REAL_PARENT($3) + ldl $0, TASK_TGID($2) +1: ldl $1, TASK_TGID($4) #ifdef CONFIG_SMP - mov $3, $4 + mov $4, $5 mb - ldq $3, TASK_REAL_PARENT($2) - cmpeq $3, $4, $4 - beq $4, 1b + ldq $3, TASK_GROUP_LEADER($2) + ldq $4, TASK_REAL_PARENT($3) + cmpeq $4, $5, $5 + beq $5, 1b #endif stq $1, 80($sp) - ldl $0, TASK_TGID($2) ret .end sys_getxpid |