Architectural Support: x86_64 (#37)
[lunaix-os.git] / lunaix-os / arch / x86 / includes / sys / syscall_utils.h
1 #ifndef __LUNAIX_ARCH_SYSCALL_UTILS_H
2 #define __LUNAIX_ARCH_SYSCALL_UTILS_H
3
4 #include <lunaix/types.h>
5 #include <klibc/string.h>
6
7 static inline void
8 convert_valist(va_list* ap_ref, sc_va_list syscall_ap)
9 {
10 #ifdef CONFIG_ARCH_X86_64
11     memcpy(ap_ref, syscall_ap, sizeof(va_list));
12 #else
13     *ap_ref = *syscall_ap;
14 #endif
15 }
16
17 #endif /* __LUNAIX_ARCH_SYSCALL_UTILS_H */