The problem stems from this call (sched_setaffinity.c:51): while (res = INTERNAL_SYSCALL (sched_getaffinity, err, 3, getpid (), psize, p), INTERNAL_SYSCALL_ERROR_P (res, err) && INTERNAL_SYSCALL_ERRNO (res, err) == EINVAL) When the macro is expanded the call to getpid clobbers the system call number. There was a similar problem on ppc documented here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=311053
Created attachment 663 [details] assign to temporary variables before the register variables
Richard, please dtrt for the alpha magic.
Subject: Bug 1358 CVSROOT: /cvs/glibc Module name: libc Changes by: rth@sources.redhat.com 2005-09-20 05:35:42 Modified files: . : ChangeLog sysdeps/unix/alpha: sysdep.h Log message: [BZ #1358] * sysdeps/unix/alpha/sysdep.h (inline_syscall1): Copy argument(s) to a temporary first. (inline_syscall2, inline_syscall3, inline_syscall4): Likewise. (inline_syscall5, inline_syscall6): Likewise. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/ChangeLog.diff?cvsroot=glibc&r1=1.9531&r2=1.9532 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/alpha/sysdep.h.diff?cvsroot=glibc&r1=1.26&r2=1.27
Fixed.
Subject: Bug 1358 CVSROOT: /cvs/glibc Module name: libc Branch: glibc-2_3-branch Changes by: rth@sources.redhat.com 2005-09-20 06:11:44 Modified files: . : ChangeLog sysdeps/alpha : ldiv.S sysdeps/unix/alpha: sysdep.h Log message: [BZ #1358] * sysdeps/unix/alpha/sysdep.h (inline_syscall1): Copy argument(s) to a temporary first. (inline_syscall2, inline_syscall3, inline_syscall4): Likewise. (inline_syscall5, inline_syscall6): Likewise. * sysdeps/alpha/ldiv.S (lldiv): Add alias. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/ChangeLog.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.9088.2.60&r2=1.9088.2.61 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/alpha/ldiv.S.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.6&r2=1.6.4.1 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/alpha/sysdep.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.26&r2=1.26.2.1