1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _ASM_M68K_SYSCALL_H 3 #define _ASM_M68K_SYSCALL_H 4 5 #include <uapi/linux/audit.h> 6 7 #include <asm/unistd.h> 8 9 extern const unsigned long sys_call_table[]; 10 11 static inline int syscall_get_nr(struct task_s 12 struct pt_reg 13 { 14 return regs->orig_d0; 15 } 16 17 static inline void syscall_rollback(struct tas 18 struct pt_ 19 { 20 regs->d0 = regs->orig_d0; 21 } 22 23 static inline long syscall_get_error(struct ta 24 struct pt 25 { 26 unsigned long error = regs->d0; 27 28 return IS_ERR_VALUE(error) ? error : 0 29 } 30 31 static inline long syscall_get_return_value(st 32 st 33 { 34 return regs->d0; 35 } 36 37 static inline void syscall_set_return_value(st 38 st 39 in 40 { 41 regs->d0 = (long)error ?: val; 42 } 43 44 static inline void syscall_get_arguments(struc 45 struc 46 unsig 47 { 48 args[0] = regs->orig_d0; 49 args++; 50 51 memcpy(args, ®s->d1, 5 * sizeof(arg 52 } 53 54 static inline void syscall_set_arguments(struc 55 struc 56 unsig 57 { 58 regs->orig_d0 = args[0]; 59 args++; 60 61 memcpy(®s->d1, args, 5 * sizeof(arg 62 } 63 64 static inline int syscall_get_arch(struct task 65 { 66 return AUDIT_ARCH_M68K; 67 } 68 69 #endif /* _ASM_M68K_SYSCALL_H */ 70
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.