aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m32r
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-m32r')
-rw-r--r--include/asm-m32r/unistd.h111
1 files changed, 0 insertions, 111 deletions
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h
index 95aa34298d82..5b66bd3c6ed6 100644
--- a/include/asm-m32r/unistd.h
+++ b/include/asm-m32r/unistd.h
@@ -296,117 +296,6 @@
296#ifdef __KERNEL__ 296#ifdef __KERNEL__
297 297
298#define NR_syscalls 285 298#define NR_syscalls 285
299#include <linux/err.h>
300
301/* user-visible error numbers are in the range -1 - -MAX_ERRNO: see
302 * <asm-m32r/errno.h>
303 */
304
305#include <asm/syscall.h> /* SYSCALL_* */
306
307#define __syscall_return(type, res) \
308do { \
309 if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
310 /* Avoid using "res" which is declared to be in register r0; \
311 errno might expand to a function call and clobber it. */ \
312 int __err = -(res); \
313 errno = __err; \
314 res = -1; \
315 } \
316 return (type) (res); \
317} while (0)
318
319#define _syscall0(type,name) \
320type name(void) \
321{ \
322register long __scno __asm__ ("r7") = __NR_##name; \
323register long __res __asm__("r0"); \
324__asm__ __volatile__ (\
325 "trap #" SYSCALL_VECTOR "|| nop"\
326 : "=r" (__res) \
327 : "r" (__scno) \
328 : "memory"); \
329__syscall_return(type,__res); \
330}
331
332#define _syscall1(type,name,type1,arg1) \
333type name(type1 arg1) \
334{ \
335register long __scno __asm__ ("r7") = __NR_##name; \
336register long __res __asm__ ("r0") = (long)(arg1); \
337__asm__ __volatile__ (\
338 "trap #" SYSCALL_VECTOR "|| nop"\
339 : "=r" (__res) \
340 : "r" (__scno), "0" (__res) \
341 : "memory"); \
342__syscall_return(type,__res); \
343}
344
345#define _syscall2(type,name,type1,arg1,type2,arg2) \
346type name(type1 arg1,type2 arg2) \
347{ \
348register long __scno __asm__ ("r7") = __NR_##name; \
349register long __arg2 __asm__ ("r1") = (long)(arg2); \
350register long __res __asm__ ("r0") = (long)(arg1); \
351__asm__ __volatile__ (\
352 "trap #" SYSCALL_VECTOR "|| nop"\
353 : "=r" (__res) \
354 : "r" (__scno), "0" (__res), "r" (__arg2) \
355 : "memory"); \
356__syscall_return(type,__res); \
357}
358
359#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
360type name(type1 arg1,type2 arg2,type3 arg3) \
361{ \
362register long __scno __asm__ ("r7") = __NR_##name; \
363register long __arg3 __asm__ ("r2") = (long)(arg3); \
364register long __arg2 __asm__ ("r1") = (long)(arg2); \
365register long __res __asm__ ("r0") = (long)(arg1); \
366__asm__ __volatile__ (\
367 "trap #" SYSCALL_VECTOR "|| nop"\
368 : "=r" (__res) \
369 : "r" (__scno), "0" (__res), "r" (__arg2), \
370 "r" (__arg3) \
371 : "memory"); \
372__syscall_return(type,__res); \
373}
374
375#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
376type name(type1 arg1,type2 arg2,type3 arg3,type4 arg4) \
377{ \
378register long __scno __asm__ ("r7") = __NR_##name; \
379register long __arg4 __asm__ ("r3") = (long)(arg4); \
380register long __arg3 __asm__ ("r2") = (long)(arg3); \
381register long __arg2 __asm__ ("r1") = (long)(arg2); \
382register long __res __asm__ ("r0") = (long)(arg1); \
383__asm__ __volatile__ (\
384 "trap #" SYSCALL_VECTOR "|| nop"\
385 : "=r" (__res) \
386 : "r" (__scno), "0" (__res), "r" (__arg2), \
387 "r" (__arg3), "r" (__arg4) \
388 : "memory"); \
389__syscall_return(type,__res); \
390}
391
392#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
393 type5,arg5) \
394type name(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
395{ \
396register long __scno __asm__ ("r7") = __NR_##name; \
397register long __arg5 __asm__ ("r4") = (long)(arg5); \
398register long __arg4 __asm__ ("r3") = (long)(arg4); \
399register long __arg3 __asm__ ("r2") = (long)(arg3); \
400register long __arg2 __asm__ ("r1") = (long)(arg2); \
401register long __res __asm__ ("r0") = (long)(arg1); \
402__asm__ __volatile__ (\
403 "trap #" SYSCALL_VECTOR "|| nop"\
404 : "=r" (__res) \
405 : "r" (__scno), "0" (__res), "r" (__arg2), \
406 "r" (__arg3), "r" (__arg4), "r" (__arg5) \
407 : "memory"); \
408__syscall_return(type,__res); \
409}
410 299
411#define __ARCH_WANT_IPC_PARSE_VERSION 300#define __ARCH_WANT_IPC_PARSE_VERSION
412#define __ARCH_WANT_STAT64 301#define __ARCH_WANT_STAT64