diff --git a/ChangeLog b/ChangeLog index e4b813935f..0973cca0f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +1998-10-24 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/Makefile [subdir=signal]: Remove + rt_sigsuspend, rt_sigprocmask, rt_sigtimedwait, rt_sigqueueinfo, + rt_sigaction and rt_sigpending. + * sysdeps/unix/sysv/linux/m68k/syscalls.list: Remove all entries + for __syscall_* functions. + * sysdeps/unix/sysv/linux/m68k/sysdep.h: Implement INLINE_SYSCALL. + 1998-10-26 Roland McGrath * hurd/Versions: Add _hurd_dtable, _hurd_dtablesize, diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index 8741550f03..7e46d51b86 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -11,8 +11,3 @@ ifeq ($(subdir),elf) sysdep-others += lddlibc4 install-bin += lddlibc4 endif - -ifeq ($(subdir),signal) -sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ - rt_sigqueueinfo rt_sigaction rt_sigpending -endif diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index d10a6e8626..9ae4f73757 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -1,45 +1,3 @@ # File name Caller Syscall name # args Strong name Weak names cacheflush EXTRA cacheflush 4 __cacheflush cacheflush - -s_getgroups getgroups getgroups 2 __syscall_getgroups -s_llseek llseek _llseek 5 __sys_llseek -s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid -s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid -s_setgid setgid setgid 1 __syscall_setgid -s_setgroups setgroups setgroups 2 __syscall_setgroups -s_setregid setregid setregid 2 __syscall_setregid -s_setresgid setresgid setresgid 3 __syscall_setresgid -s_setresuid setresuid setresuid 3 __syscall_setresuid -s_setreuid setreuid setreuid 2 __syscall_setreuid -s_setuid setuid setuid 1 __syscall_setuid - -# System calls with wrappers. -rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction -rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending -rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask -rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo -rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend -rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait -s_getcwd getcwd getcwd 2 __syscall_getcwd -s_getdents getdents getdents 3 __syscall_getdents -s_getpriority getpriority getpriority 2 __syscall_getpriority -s_getresgid getresgid getresgid 3 __syscall_getresgid -s_getresuid getresuid getresuid 3 __syscall_getresuid -s_poll poll poll 3 __syscall_poll -s_pread64 pread64 pread 5 __syscall_pread64 -s_ptrace ptrace ptrace 4 __syscall_ptrace -s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64 -s_reboot reboot reboot 3 __syscall_reboot -s_sigaction sigaction sigaction 3 __syscall_sigaction -s_sigpending sigpending sigpending 1 __syscall_sigpending -s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask -s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend -s_sysctl sysctl _sysctl 1 __syscall__sysctl -s_ustat ustat ustat 2 __syscall_ustat -sys_fstat fxstat fstat 2 __syscall_fstat -sys_lstat lxstat lstat 2 __syscall_lstat -sys_mknod xmknod mknod 3 __syscall_mknod -sys_readv readv readv 3 __syscall_readv -sys_stat xstat stat 2 __syscall_stat -sys_writev writev writev 3 __syscall_writev diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 4094172587..d445471440 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -158,4 +158,50 @@ SYSCALL_ERROR_LABEL: \ #define MOVE(x,y) movel x , y #endif -#endif /* __ASSEMBLER__ */ +#else /* not __ASSEMBLER__ */ + +/* Define a macro which expands into the inline wrapper code for a system + call. */ +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ unsigned int _sys_result; \ + { \ + LOAD_ARGS_##nr (args) \ + register int _d0 asm ("%d0") = __NR_##name; \ + asm volatile ("trap #0" \ + : "=d" (_d0) \ + : "0" (_d0) ASM_ARGS_##nr \ + : "d0"); \ + _sys_result = _d0; \ + } \ + if (_sys_result >= (unsigned int) -4095) \ + { \ + __set_errno (-_sys_result); \ + _sys_result = (unsigned int) -1; \ + } \ + (int) _sys_result; }) + +#define LOAD_ARGS_0() +#define ASM_ARGS_0 +#define LOAD_ARGS_1(a1) \ + register int _d1 asm ("d1") = (int) (a1); \ + LOAD_ARGS_0 () +#define ASM_ARGS_1 ASM_ARGS_0, "d" (_d1) +#define LOAD_ARGS_2(a1, a2) \ + register int _d2 asm ("d2") = (int) (a2); \ + LOAD_ARGS_1 (a1) +#define ASM_ARGS_2 ASM_ARGS_1, "d" (_d2) +#define LOAD_ARGS_3(a1, a2, a3) \ + register int _d3 asm ("d3") = (int) (a3); \ + LOAD_ARGS_2 (a1, a2) +#define ASM_ARGS_3 ASM_ARGS_2, "d" (_d3) +#define LOAD_ARGS_4(a1, a2, a3, a4) \ + register int _d4 asm ("d4") = (int) (a4); \ + LOAD_ARGS_3 (a1, a2, a3) +#define ASM_ARGS_4 ASM_ARGS_3, "d" (_d4) +#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ + register int _d5 asm ("d5") = (int) (a5); \ + LOAD_ARGS_4 (a1, a2, a3, a4) +#define ASM_ARGS_5 ASM_ARGS_4, "d" (_d5) + +#endif /* not __ASSEMBLER__ */