004e60ace8d86771652405c2076f555969bd12d8
5 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
8 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
10 * Permission is hereby granted to use or copy this program
11 * for any purpose, provided the above notices are retained on all copies.
12 * Permission to modify the code and to distribute modified code is granted,
13 * provided the above notices are retained, and a notice that the code was
14 * modified is included with the above copyright notice.
18 * lttng_ust_getprocname.
22 #include <sys/prctl.h>
24 #define LTTNG_UST_PROCNAME_LEN 17
27 void lttng_ust_getprocname(char *name
)
29 (void) prctl(PR_GET_NAME
, (unsigned long) name
, 0, 0, 0);
32 #elif defined(__FreeBSD__)
37 * Limit imposed by Linux UST-sessiond ABI.
39 #define LTTNG_UST_PROCNAME_LEN 17
42 * Acts like linux prctl, the string is not necessarily 0-terminated if
46 void lttng_ust_getprocname(char *name
)
50 bsd_name
= getprogname();
53 memcpy(name
, bsd_name
, LTTNG_UST_PROCNAME_LEN
- 1);
61 #define ENODATA ENOMSG
64 #endif /* _UST_COMPAT_H */
This page took 0.030908 seconds and 3 git commands to generate.