| 1 |
|
| 2 | |
| 3 | * Prctl definitions for NOLIBC
|
| 4 | * Copyright (C) 2017-2021 Willy Tarreau <[email protected]>
|
| 5 |
|
| 6 |
|
| 7 |
|
| 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 |
|
| 22 | static __attribute__((unused))
|
| 23 | int _sys_prctl(int option, unsigned long arg2, unsigned long arg3,
|
| 24 | unsigned long arg4, unsigned long arg5)
|
| 25 | {
|
| 26 | return __nolibc_syscall5(__NR_prctl, option, arg2, arg3, arg4, arg5);
|
| 27 | }
|
| 28 |
|
| 29 | static __attribute__((unused))
|
| 30 | int 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
|