lkml.org 
[lkml]   [2003]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Same syscall is defined to different numbers on 3 different archs(was Re: Makefile issue)
From
Date
"Robert Williamson" <robbiew@us.ibm.com> writes:
>
> Obviously, we could add additional code to check for the running arch and
> define the syscall accordingly, however I'm not sure this is the correct
> way to go. I'm copying our list, as well as the kernel mailing list about
> this, because I "think" the system calls should be defined to the same
> numbers across all architectures....but I'm not positive. BTW, I attached

No. Linux has traditionally used different syscall numbers for different
architectures. The original ports (alpha etc.) always used the syscall numbers
of the "native" Unix, so the numbering was often completely different.
Newer ports who weren't concered about such compatibility often did
a renumbering too. For example x86-64 has a completely new
"cache line optimized" ordering.

What should work on most architectures is
(most = someone told me it doesn't work properly on IA64)

#include </path/to/kernel/source/include/asm-<arch>/unistd.h>
(you need the version in the kernel source because many glibc packagers
in their infinite wisdom use an old outdated copy of asm/ usually from
the last stable kernel only)

_syscallN(...)

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [from the cache]
©2003-2011 Jasper Spaans