--- ./kernel/timer.c.orig 2005-07-02 22:38:30 +0200 +++ ./kernel/timer.c 2005-07-05 05:26:26 +0200 @@ -963,7 +963,38 @@ asmlinkage unsigned long sys_alarm(unsig #endif -#ifndef __alpha__ +#ifdef __alpha__ + +asmlinkage long do_getxpid(long *ppid) +{ + int pid; + struct task_struct *me = current; + struct task_struct *parent; + + parent = me->group_leader->real_parent; + for (;;) { + pid = parent->tgid; +#ifdef CONFIG_SMP +{ + struct task_struct *old = parent; + + /* + * Make sure we read the pid before re-reading the + * parent pointer: + */ + smp_rmb(); + parent = me->group_leader->real_parent; + if (old != parent) + continue; +} +#endif + break; + } + *ppid = vx_map_pid(pid); + return vx_map_pid(current->tgid); +} + +#else /* * The Alpha uses getxpid, getxuid, and getxgid instead. Maybe this