sparc64: add basic support
[uclibc-ng.git] / libc / sysdeps / linux / avr32 / prctl.c
blob4e146e35e18200cea7e3b00d539a027f79c6d91f
1 /*
2 * prctl syscall for AVR32 Linux.
4 * Copyright (C) 2010 Atmel Corporation
6 * This file is subject to the terms and conditions of the GNU Lesser General
7 * Public License. See the file "COPYING.LIB" in the main directory of this
8 * archive for more details.
9 */
10 #include <sys/syscall.h>
11 #include <sys/prctl.h>
12 #include <stdarg.h>
14 #ifdef __NR_prctl
15 #define __NR___syscall_prctl __NR_prctl
16 static inline _syscall5(int, __syscall_prctl, int, option, long, arg2,
17 long, arg3, long, arg4, long, arg5);
19 int prctl(int __option, ...)
21 long arg2;
22 long arg3;
23 long arg4;
24 long arg5;
25 va_list ap;
27 va_start(ap, __option);
28 arg2 = va_arg(ap, long);
29 arg3 = va_arg(ap, long);
30 arg4 = va_arg(ap, long);
31 arg5 = va_arg(ap, long);
32 va_end(ap);
34 return INLINE_SYSCALL(prctl, 5, __option, arg2, arg3, arg4, arg5);
36 #endif