197b393968c8df21f3694756de644f8f4e48f802
[lttng-tools.git] / src / common / compat / prctl.h
1 /*
2 * Copyright (C) 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8 #ifndef _COMPAT_PRCTL_H
9 #define _COMPAT_PRCTL_H
10
11 #ifdef __linux__
12 #include <sys/prctl.h>
13
14 static inline
15 int lttng_prctl(int option, unsigned long arg2, unsigned long arg3,
16 unsigned long arg4, unsigned long arg5)
17 {
18 return prctl(option, arg2, arg3, arg4, arg5);
19 }
20
21 #else
22
23 #ifndef PR_SET_NAME
24 #define PR_SET_NAME 0
25 #endif /* PR_SET_NAME */
26
27 static inline
28 int lttng_prctl(int option, unsigned long arg2, unsigned long arg3,
29 unsigned long arg4, unsigned long arg5)
30 {
31 return -ENOSYS;
32 }
33
34 #endif /* __linux__ */
35
36 #endif /* _COMPAT_PRCTL_H */
This page took 0.030104 seconds and 3 git commands to generate.