3 #ifndef _SYSCALL_ARGS_H
4 #define _SYSCALL_ARGS_H
9 // Hack to be able to use the IS_USER_ADDRESS macro when compiling for R5.
10 #ifdef R5_MEMORY_LAYOUT
12 # define KERNEL_BASE 0x0
15 // copy_ref_var_from_user
19 copy_ref_var_from_user(T
*user
, T
&kernel
)
21 if (!IS_USER_ADDRESS(user
))
23 return user_memcpy(&kernel
, user
, sizeof(T
));
26 // copy_ref_var_to_user
30 copy_ref_var_to_user(T
&kernel
, T
*user
)
32 if (!IS_USER_ADDRESS(user
))
34 return user_memcpy(user
, &kernel
, sizeof(T
));
38 #endif // _SYSCALL_ARGS_H