diff options
Diffstat (limited to 'include/asm-m68k')
-rw-r--r-- | include/asm-m68k/unistd.h | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index ad4348058c66..fdbb60e6a0d4 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h | |||
@@ -317,103 +317,6 @@ | |||
317 | #ifdef __KERNEL__ | 317 | #ifdef __KERNEL__ |
318 | 318 | ||
319 | #define NR_syscalls 311 | 319 | #define NR_syscalls 311 |
320 | #include <linux/err.h> | ||
321 | |||
322 | /* user-visible error numbers are in the range -1 - -MAX_ERRNO: see | ||
323 | <asm-m68k/errno.h> */ | ||
324 | |||
325 | #define __syscall_return(type, res) \ | ||
326 | do { \ | ||
327 | if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \ | ||
328 | /* avoid using res which is declared to be in register d0; \ | ||
329 | errno might expand to a function call and clobber it. */ \ | ||
330 | int __err = -(res); \ | ||
331 | errno = __err; \ | ||
332 | res = -1; \ | ||
333 | } \ | ||
334 | return (type) (res); \ | ||
335 | } while (0) | ||
336 | |||
337 | #define _syscall0(type,name) \ | ||
338 | type name(void) \ | ||
339 | { \ | ||
340 | register long __res __asm__ ("%d0") = __NR_##name; \ | ||
341 | __asm__ __volatile__ ("trap #0" \ | ||
342 | : "+d" (__res) ); \ | ||
343 | __syscall_return(type,__res); \ | ||
344 | } | ||
345 | |||
346 | #define _syscall1(type,name,atype,a) \ | ||
347 | type name(atype a) \ | ||
348 | { \ | ||
349 | register long __res __asm__ ("%d0") = __NR_##name; \ | ||
350 | register long __a __asm__ ("%d1") = (long)(a); \ | ||
351 | __asm__ __volatile__ ("trap #0" \ | ||
352 | : "+d" (__res) \ | ||
353 | : "d" (__a) ); \ | ||
354 | __syscall_return(type,__res); \ | ||
355 | } | ||
356 | |||
357 | #define _syscall2(type,name,atype,a,btype,b) \ | ||
358 | type name(atype a,btype b) \ | ||
359 | { \ | ||
360 | register long __res __asm__ ("%d0") = __NR_##name; \ | ||
361 | register long __a __asm__ ("%d1") = (long)(a); \ | ||
362 | register long __b __asm__ ("%d2") = (long)(b); \ | ||
363 | __asm__ __volatile__ ("trap #0" \ | ||
364 | : "+d" (__res) \ | ||
365 | : "d" (__a), "d" (__b) \ | ||
366 | ); \ | ||
367 | __syscall_return(type,__res); \ | ||
368 | } | ||
369 | |||
370 | #define _syscall3(type,name,atype,a,btype,b,ctype,c) \ | ||
371 | type name(atype a,btype b,ctype c) \ | ||
372 | { \ | ||
373 | register long __res __asm__ ("%d0") = __NR_##name; \ | ||
374 | register long __a __asm__ ("%d1") = (long)(a); \ | ||
375 | register long __b __asm__ ("%d2") = (long)(b); \ | ||
376 | register long __c __asm__ ("%d3") = (long)(c); \ | ||
377 | __asm__ __volatile__ ("trap #0" \ | ||
378 | : "+d" (__res) \ | ||
379 | : "d" (__a), "d" (__b), \ | ||
380 | "d" (__c) \ | ||
381 | ); \ | ||
382 | __syscall_return(type,__res); \ | ||
383 | } | ||
384 | |||
385 | #define _syscall4(type,name,atype,a,btype,b,ctype,c,dtype,d) \ | ||
386 | type name (atype a, btype b, ctype c, dtype d) \ | ||
387 | { \ | ||
388 | register long __res __asm__ ("%d0") = __NR_##name; \ | ||
389 | register long __a __asm__ ("%d1") = (long)(a); \ | ||
390 | register long __b __asm__ ("%d2") = (long)(b); \ | ||
391 | register long __c __asm__ ("%d3") = (long)(c); \ | ||
392 | register long __d __asm__ ("%d4") = (long)(d); \ | ||
393 | __asm__ __volatile__ ("trap #0" \ | ||
394 | : "+d" (__res) \ | ||
395 | : "d" (__a), "d" (__b), \ | ||
396 | "d" (__c), "d" (__d) \ | ||
397 | ); \ | ||
398 | __syscall_return(type,__res); \ | ||
399 | } | ||
400 | |||
401 | #define _syscall5(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ | ||
402 | type name (atype a,btype b,ctype c,dtype d,etype e) \ | ||
403 | { \ | ||
404 | register long __res __asm__ ("%d0") = __NR_##name; \ | ||
405 | register long __a __asm__ ("%d1") = (long)(a); \ | ||
406 | register long __b __asm__ ("%d2") = (long)(b); \ | ||
407 | register long __c __asm__ ("%d3") = (long)(c); \ | ||
408 | register long __d __asm__ ("%d4") = (long)(d); \ | ||
409 | register long __e __asm__ ("%d5") = (long)(e); \ | ||
410 | __asm__ __volatile__ ("trap #0" \ | ||
411 | : "+d" (__res) \ | ||
412 | : "d" (__a), "d" (__b), \ | ||
413 | "d" (__c), "d" (__d), "d" (__e) \ | ||
414 | ); \ | ||
415 | __syscall_return(type,__res); \ | ||
416 | } | ||
417 | 320 | ||
418 | #define __ARCH_WANT_IPC_PARSE_VERSION | 321 | #define __ARCH_WANT_IPC_PARSE_VERSION |
419 | #define __ARCH_WANT_OLD_READDIR | 322 | #define __ARCH_WANT_OLD_READDIR |