aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm26/unistd.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2006-12-06 23:37:29 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:37 -0500
commitf5738ceed46782aea7663d62cb6398eb05fc4ce0 (patch)
tree156ebf498bc1d892d6f9e33d2751869417e30eb4 /include/asm-arm26/unistd.h
parent28ec24e23229ae3d333f8d7f0e6b31fa8ea7bf46 (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-arm26/unistd.h')
-rw-r--r--include/asm-arm26/unistd.h133
1 files changed, 0 insertions, 133 deletions
diff --git a/include/asm-arm26/unistd.h b/include/asm-arm26/unistd.h
index 25a5eead85be..4c3b919177e5 100644
--- a/include/asm-arm26/unistd.h
+++ b/include/asm-arm26/unistd.h
@@ -311,139 +311,6 @@
311#define __ARM_NR_usr26 (__ARM_NR_BASE+3) 311#define __ARM_NR_usr26 (__ARM_NR_BASE+3)
312 312
313#ifdef __KERNEL__ 313#ifdef __KERNEL__
314#include <linux/err.h>
315#include <linux/linkage.h>
316
317#define __sys2(x) #x
318#define __sys1(x) __sys2(x)
319
320#ifndef __syscall
321#define __syscall(name) "swi\t" __sys1(__NR_##name) ""
322#endif
323
324#define __syscall_return(type, res) \
325do { \
326 if ((unsigned long)(res) >= (unsigned long)-MAX_ERRNO) { \
327 errno = -(res); \
328 res = -1; \
329 } \
330 return (type) (res); \
331} while (0)
332
333#define _syscall0(type,name) \
334type name(void) { \
335 register long __res_r0 __asm__("r0"); \
336 long __res; \
337 __asm__ __volatile__ ( \
338 __syscall(name) \
339 : "=r" (__res_r0) \
340 : \
341 : "lr"); \
342 __res = __res_r0; \
343 __syscall_return(type,__res); \
344}
345
346#define _syscall1(type,name,type1,arg1) \
347type name(type1 arg1) { \
348 register long __r0 __asm__("r0") = (long)arg1; \
349 register long __res_r0 __asm__("r0"); \
350 long __res; \
351 __asm__ __volatile__ ( \
352 __syscall(name) \
353 : "=r" (__res_r0) \
354 : "r" (__r0) \
355 : "lr"); \
356 __res = __res_r0; \
357 __syscall_return(type,__res); \
358}
359
360#define _syscall2(type,name,type1,arg1,type2,arg2) \
361type name(type1 arg1,type2 arg2) { \
362 register long __r0 __asm__("r0") = (long)arg1; \
363 register long __r1 __asm__("r1") = (long)arg2; \
364 register long __res_r0 __asm__("r0"); \
365 long __res; \
366 __asm__ __volatile__ ( \
367 __syscall(name) \
368 : "=r" (__res_r0) \
369 : "r" (__r0),"r" (__r1) \
370 : "lr"); \
371 __res = __res_r0; \
372 __syscall_return(type,__res); \
373}
374
375
376#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
377type name(type1 arg1,type2 arg2,type3 arg3) { \
378 register long __r0 __asm__("r0") = (long)arg1; \
379 register long __r1 __asm__("r1") = (long)arg2; \
380 register long __r2 __asm__("r2") = (long)arg3; \
381 register long __res_r0 __asm__("r0"); \
382 long __res; \
383 __asm__ __volatile__ ( \
384 __syscall(name) \
385 : "=r" (__res_r0) \
386 : "r" (__r0),"r" (__r1),"r" (__r2) \
387 : "lr"); \
388 __res = __res_r0; \
389 __syscall_return(type,__res); \
390}
391
392
393#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\
394type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
395 register long __r0 __asm__("r0") = (long)arg1; \
396 register long __r1 __asm__("r1") = (long)arg2; \
397 register long __r2 __asm__("r2") = (long)arg3; \
398 register long __r3 __asm__("r3") = (long)arg4; \
399 register long __res_r0 __asm__("r0"); \
400 long __res; \
401 __asm__ __volatile__ ( \
402 __syscall(name) \
403 : "=r" (__res_r0) \
404 : "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3) \
405 : "lr"); \
406 __res = __res_r0; \
407 __syscall_return(type,__res); \
408}
409
410
411#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
412type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \
413 register long __r0 __asm__("r0") = (long)arg1; \
414 register long __r1 __asm__("r1") = (long)arg2; \
415 register long __r2 __asm__("r2") = (long)arg3; \
416 register long __r3 __asm__("r3") = (long)arg4; \
417 register long __r4 __asm__("r4") = (long)arg5; \
418 register long __res_r0 __asm__("r0"); \
419 long __res; \
420 __asm__ __volatile__ ( \
421 __syscall(name) \
422 : "=r" (__res_r0) \
423 : "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3),"r" (__r4) \
424 : "lr"); \
425 __res = __res_r0; \
426 __syscall_return(type,__res); \
427}
428
429#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \
430type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) { \
431 register long __r0 __asm__("r0") = (long)arg1; \
432 register long __r1 __asm__("r1") = (long)arg2; \
433 register long __r2 __asm__("r2") = (long)arg3; \
434 register long __r3 __asm__("r3") = (long)arg4; \
435 register long __r4 __asm__("r4") = (long)arg5; \
436 register long __r5 __asm__("r5") = (long)arg6; \
437 register long __res_r0 __asm__("r0"); \
438 long __res; \
439 __asm__ __volatile__ ( \
440 __syscall(name) \
441 : "=r" (__res_r0) \
442 : "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3), "r" (__r4),"r" (__r5) \
443 : "lr"); \
444 __res = __res_r0; \
445 __syscall_return(type,__res); \
446}
447 314
448#define __ARCH_WANT_IPC_PARSE_VERSION 315#define __ARCH_WANT_IPC_PARSE_VERSION
449#define __ARCH_WANT_OLD_READDIR 316#define __ARCH_WANT_OLD_READDIR