diff options
author | Arnd Bergmann <arnd@arndb.de> | 2006-12-06 23:37:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:37 -0500 |
commit | f5738ceed46782aea7663d62cb6398eb05fc4ce0 (patch) | |
tree | 156ebf498bc1d892d6f9e33d2751869417e30eb4 /include/asm-i386/unistd.h | |
parent | 28ec24e23229ae3d333f8d7f0e6b31fa8ea7bf46 (diff) |
[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>
Diffstat (limited to 'include/asm-i386/unistd.h')
-rw-r--r-- | include/asm-i386/unistd.h | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index beeeaf6b054a..833fa1704ff9 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -329,104 +329,6 @@ | |||
329 | #ifdef __KERNEL__ | 329 | #ifdef __KERNEL__ |
330 | 330 | ||
331 | #define NR_syscalls 320 | 331 | #define NR_syscalls 320 |
332 | #include <linux/err.h> | ||
333 | |||
334 | /* | ||
335 | * user-visible error numbers are in the range -1 - -MAX_ERRNO: see | ||
336 | * <asm-i386/errno.h> | ||
337 | */ | ||
338 | #define __syscall_return(type, res) \ | ||
339 | do { \ | ||
340 | if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \ | ||
341 | errno = -(res); \ | ||
342 | res = -1; \ | ||
343 | } \ | ||
344 | return (type) (res); \ | ||
345 | } while (0) | ||
346 | |||
347 | /* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ | ||
348 | #define _syscall0(type,name) \ | ||
349 | type name(void) \ | ||
350 | { \ | ||
351 | long __res; \ | ||
352 | __asm__ volatile ("int $0x80" \ | ||
353 | : "=a" (__res) \ | ||
354 | : "0" (__NR_##name)); \ | ||
355 | __syscall_return(type,__res); \ | ||
356 | } | ||
357 | |||
358 | #define _syscall1(type,name,type1,arg1) \ | ||
359 | type name(type1 arg1) \ | ||
360 | { \ | ||
361 | long __res; \ | ||
362 | __asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \ | ||
363 | : "=a" (__res) \ | ||
364 | : "0" (__NR_##name),"ri" ((long)(arg1)) : "memory"); \ | ||
365 | __syscall_return(type,__res); \ | ||
366 | } | ||
367 | |||
368 | #define _syscall2(type,name,type1,arg1,type2,arg2) \ | ||
369 | type name(type1 arg1,type2 arg2) \ | ||
370 | { \ | ||
371 | long __res; \ | ||
372 | __asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \ | ||
373 | : "=a" (__res) \ | ||
374 | : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)) \ | ||
375 | : "memory"); \ | ||
376 | __syscall_return(type,__res); \ | ||
377 | } | ||
378 | |||
379 | #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ | ||
380 | type name(type1 arg1,type2 arg2,type3 arg3) \ | ||
381 | { \ | ||
382 | long __res; \ | ||
383 | __asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \ | ||
384 | : "=a" (__res) \ | ||
385 | : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \ | ||
386 | "d" ((long)(arg3)) : "memory"); \ | ||
387 | __syscall_return(type,__res); \ | ||
388 | } | ||
389 | |||
390 | #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ | ||
391 | type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ | ||
392 | { \ | ||
393 | long __res; \ | ||
394 | __asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \ | ||
395 | : "=a" (__res) \ | ||
396 | : "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \ | ||
397 | "d" ((long)(arg3)),"S" ((long)(arg4)) : "memory"); \ | ||
398 | __syscall_return(type,__res); \ | ||
399 | } | ||
400 | |||
401 | #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ | ||
402 | type5,arg5) \ | ||
403 | type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ | ||
404 | { \ | ||
405 | long __res; \ | ||
406 | __asm__ volatile ("push %%ebx ; movl %2,%%ebx ; movl %1,%%eax ; " \ | ||
407 | "int $0x80 ; pop %%ebx" \ | ||
408 | : "=a" (__res) \ | ||
409 | : "i" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \ | ||
410 | "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)) \ | ||
411 | : "memory"); \ | ||
412 | __syscall_return(type,__res); \ | ||
413 | } | ||
414 | |||
415 | #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ | ||
416 | type5,arg5,type6,arg6) \ | ||
417 | type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ | ||
418 | { \ | ||
419 | long __res; \ | ||
420 | struct { long __a1; long __a6; } __s = { (long)arg1, (long)arg6 }; \ | ||
421 | __asm__ volatile ("push %%ebp ; push %%ebx ; movl 4(%2),%%ebp ; " \ | ||
422 | "movl 0(%2),%%ebx ; movl %1,%%eax ; int $0x80 ; " \ | ||
423 | "pop %%ebx ; pop %%ebp" \ | ||
424 | : "=a" (__res) \ | ||
425 | : "i" (__NR_##name),"0" ((long)(&__s)),"c" ((long)(arg2)), \ | ||
426 | "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)) \ | ||
427 | : "memory"); \ | ||
428 | __syscall_return(type,__res); \ | ||
429 | } | ||
430 | 332 | ||
431 | #define __ARCH_WANT_IPC_PARSE_VERSION | 333 | #define __ARCH_WANT_IPC_PARSE_VERSION |
432 | #define __ARCH_WANT_OLD_READDIR | 334 | #define __ARCH_WANT_OLD_READDIR |