Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
2/*
3 * Prctl definitions for NOLIBC
4 * Copyright (C) 2017-2021 Willy Tarreau <w@1wt.eu>
5 */
6
7/* make sure to include all global symbols */
8#include "../nolibc.h"
9
10#ifndef _NOLIBC_SYS_PRCTL_H
11#define _NOLIBC_SYS_PRCTL_H
12
13#include "../sys.h"
14
15#include <linux/prctl.h>
16
17/*
18 * int prctl(int option, unsigned long arg2, unsigned long arg3,
19 * unsigned long arg4, unsigned long arg5);
20 */
21
22static __attribute__((unused))
23int sys_prctl(int option, unsigned long arg2, unsigned long arg3,
24 unsigned long arg4, unsigned long arg5)
25{
26 return my_syscall5(__NR_prctl, option, arg2, arg3, arg4, arg5);
27}
28
29static __attribute__((unused))
30int prctl(int option, unsigned long arg2, unsigned long arg3,
31 unsigned long arg4, unsigned long arg5)
32{
33 return __sysret(sys_prctl(option, arg2, arg3, arg4, arg5));
34}
35
36#endif /* _NOLIBC_SYS_PRCTL_H */