diff options
Diffstat (limited to 'include/asm-m32r')
-rw-r--r-- | include/asm-m32r/unistd.h | 111 |
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) \ | ||
308 | do { \ | ||
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) \ | ||
320 | type name(void) \ | ||
321 | { \ | ||
322 | register long __scno __asm__ ("r7") = __NR_##name; \ | ||
323 | register 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) \ | ||
333 | type name(type1 arg1) \ | ||
334 | { \ | ||
335 | register long __scno __asm__ ("r7") = __NR_##name; \ | ||
336 | register 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) \ | ||
346 | type name(type1 arg1,type2 arg2) \ | ||
347 | { \ | ||
348 | register long __scno __asm__ ("r7") = __NR_##name; \ | ||
349 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ | ||
350 | register 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) \ | ||
360 | type name(type1 arg1,type2 arg2,type3 arg3) \ | ||
361 | { \ | ||
362 | register long __scno __asm__ ("r7") = __NR_##name; \ | ||
363 | register long __arg3 __asm__ ("r2") = (long)(arg3); \ | ||
364 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ | ||
365 | register 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) \ | ||
376 | type name(type1 arg1,type2 arg2,type3 arg3,type4 arg4) \ | ||
377 | { \ | ||
378 | register long __scno __asm__ ("r7") = __NR_##name; \ | ||
379 | register long __arg4 __asm__ ("r3") = (long)(arg4); \ | ||
380 | register long __arg3 __asm__ ("r2") = (long)(arg3); \ | ||
381 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ | ||
382 | register 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) \ | ||
394 | type name(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ | ||
395 | { \ | ||
396 | register long __scno __asm__ ("r7") = __NR_##name; \ | ||
397 | register long __arg5 __asm__ ("r4") = (long)(arg5); \ | ||
398 | register long __arg4 __asm__ ("r3") = (long)(arg4); \ | ||
399 | register long __arg3 __asm__ ("r2") = (long)(arg3); \ | ||
400 | register long __arg2 __asm__ ("r1") = (long)(arg2); \ | ||
401 | register 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 |