mirror of
https://github.com/torvalds/linux.git
synced 2026-09-15 15:01:08 -04:00
[PATCH] remove kernel syscalls
The last thing we agreed on was to remove the macros entirely for 2.6.19, on all architectures. Unfortunately, I think nobody actually _did_ that, so they are still there. [akpm@osdl.org: x86_64 fix] Cc: David Woodhouse <dwmw2@infradead.org> Cc: Greg Schafer <gschafer@zip.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
28ec24e232
commit
f5738ceed4
@@ -329,136 +329,6 @@
|
||||
* find a free slot in the 0-302 range.
|
||||
*/
|
||||
|
||||
#define _syscall0(type,name) \
|
||||
type name(void) \
|
||||
{ \
|
||||
long __res; \
|
||||
register long __g1 __asm__ ("g1") = __NR_##name; \
|
||||
__asm__ __volatile__ ("t 0x10\n\t" \
|
||||
"bcc 1f\n\t" \
|
||||
"mov %%o0, %0\n\t" \
|
||||
"sub %%g0, %%o0, %0\n\t" \
|
||||
"1:\n\t" \
|
||||
: "=r" (__res)\
|
||||
: "r" (__g1) \
|
||||
: "o0", "cc"); \
|
||||
if (__res < -255 || __res >= 0) \
|
||||
return (type) __res; \
|
||||
errno = -__res; \
|
||||
return -1; \
|
||||
}
|
||||
|
||||
#define _syscall1(type,name,type1,arg1) \
|
||||
type name(type1 arg1) \
|
||||
{ \
|
||||
long __res; \
|
||||
register long __g1 __asm__ ("g1") = __NR_##name; \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
__asm__ __volatile__ ("t 0x10\n\t" \
|
||||
"bcc 1f\n\t" \
|
||||
"mov %%o0, %0\n\t" \
|
||||
"sub %%g0, %%o0, %0\n\t" \
|
||||
"1:\n\t" \
|
||||
: "=r" (__res), "=&r" (__o0) \
|
||||
: "1" (__o0), "r" (__g1) \
|
||||
: "cc"); \
|
||||
if (__res < -255 || __res >= 0) \
|
||||
return (type) __res; \
|
||||
errno = -__res; \
|
||||
return -1; \
|
||||
}
|
||||
|
||||
#define _syscall2(type,name,type1,arg1,type2,arg2) \
|
||||
type name(type1 arg1,type2 arg2) \
|
||||
{ \
|
||||
long __res; \
|
||||
register long __g1 __asm__ ("g1") = __NR_##name; \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
register long __o1 __asm__ ("o1") = (long)(arg2); \
|
||||
__asm__ __volatile__ ("t 0x10\n\t" \
|
||||
"bcc 1f\n\t" \
|
||||
"mov %%o0, %0\n\t" \
|
||||
"sub %%g0, %%o0, %0\n\t" \
|
||||
"1:\n\t" \
|
||||
: "=r" (__res), "=&r" (__o0) \
|
||||
: "1" (__o0), "r" (__o1), "r" (__g1) \
|
||||
: "cc"); \
|
||||
if (__res < -255 || __res >= 0) \
|
||||
return (type) __res; \
|
||||
errno = -__res; \
|
||||
return -1; \
|
||||
}
|
||||
|
||||
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
|
||||
type name(type1 arg1,type2 arg2,type3 arg3) \
|
||||
{ \
|
||||
long __res; \
|
||||
register long __g1 __asm__ ("g1") = __NR_##name; \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
register long __o1 __asm__ ("o1") = (long)(arg2); \
|
||||
register long __o2 __asm__ ("o2") = (long)(arg3); \
|
||||
__asm__ __volatile__ ("t 0x10\n\t" \
|
||||
"bcc 1f\n\t" \
|
||||
"mov %%o0, %0\n\t" \
|
||||
"sub %%g0, %%o0, %0\n\t" \
|
||||
"1:\n\t" \
|
||||
: "=r" (__res), "=&r" (__o0) \
|
||||
: "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \
|
||||
: "cc"); \
|
||||
if (__res < -255 || __res>=0) \
|
||||
return (type) __res; \
|
||||
errno = -__res; \
|
||||
return -1; \
|
||||
}
|
||||
|
||||
#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
|
||||
type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
|
||||
{ \
|
||||
long __res; \
|
||||
register long __g1 __asm__ ("g1") = __NR_##name; \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
register long __o1 __asm__ ("o1") = (long)(arg2); \
|
||||
register long __o2 __asm__ ("o2") = (long)(arg3); \
|
||||
register long __o3 __asm__ ("o3") = (long)(arg4); \
|
||||
__asm__ __volatile__ ("t 0x10\n\t" \
|
||||
"bcc 1f\n\t" \
|
||||
"mov %%o0, %0\n\t" \
|
||||
"sub %%g0, %%o0, %0\n\t" \
|
||||
"1:\n\t" \
|
||||
: "=r" (__res), "=&r" (__o0) \
|
||||
: "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \
|
||||
: "cc"); \
|
||||
if (__res < -255 || __res>=0) \
|
||||
return (type) __res; \
|
||||
errno = -__res; \
|
||||
return -1; \
|
||||
}
|
||||
|
||||
#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
|
||||
type5,arg5) \
|
||||
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
|
||||
{ \
|
||||
long __res; \
|
||||
register long __g1 __asm__ ("g1") = __NR_##name; \
|
||||
register long __o0 __asm__ ("o0") = (long)(arg1); \
|
||||
register long __o1 __asm__ ("o1") = (long)(arg2); \
|
||||
register long __o2 __asm__ ("o2") = (long)(arg3); \
|
||||
register long __o3 __asm__ ("o3") = (long)(arg4); \
|
||||
register long __o4 __asm__ ("o4") = (long)(arg5); \
|
||||
__asm__ __volatile__ ("t 0x10\n\t" \
|
||||
"bcc 1f\n\t" \
|
||||
"mov %%o0, %0\n\t" \
|
||||
"sub %%g0, %%o0, %0\n\t" \
|
||||
"1:\n\t" \
|
||||
: "=r" (__res), "=&r" (__o0) \
|
||||
: "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \
|
||||
: "cc"); \
|
||||
if (__res < -255 || __res>=0) \
|
||||
return (type) __res; \
|
||||
errno = -__res; \
|
||||
return -1; \
|
||||
}
|
||||
|
||||
#define __ARCH_WANT_IPC_PARSE_VERSION
|
||||
#define __ARCH_WANT_OLD_READDIR
|
||||
#define __ARCH_WANT_STAT64
|
||||
|
||||
Reference in New Issue
Block a user