summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/nds32/prctl.c
blob: b20f4ca795b35b92d07fd2436ee1991d1922d7f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 *  Copyright (C) 2017 Andes Technology, Inc.
 *  Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 */

#include <errno.h>
#include <stdarg.h>
#include <sysdep.h>
#include <sys/prctl.h>
#include <sys/syscall.h>

int prctl (int __option, ...)
{
	unsigned long arg1,arg2,arg3,arg4;
	va_list arg;
	va_start (arg, __option);
	arg1 = va_arg (arg, unsigned long);
	arg2 = va_arg (arg, unsigned long);
	arg3 = va_arg (arg, unsigned long);
	arg4 = va_arg (arg, unsigned long);
	va_end (arg);
	return INLINE_SYSCALL(prctl,5,__option,arg1,arg2,arg3,arg4);
}