blob: 15e74faa7602afed0627765acace1f6a2d984f00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef NETDATA_OS_H
#define NETDATA_OS_H
#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_MACOS)
#include <sys/syscall.h>
#endif
#include "setproctitle.h"
#include "close_range.h"
#include "setresuid.h"
#include "setresgid.h"
#include "getgrouplist.h"
#include "adjtimex.h"
#include "gettid.h"
#include "get_pid_max.h"
#include "get_system_cpus.h"
#include "tinysleep.h"
#include "uuid_generate.h"
#include "setenv.h"
#include "os-freebsd-wrappers.h"
#include "os-macos-wrappers.h"
#include "os-windows-wrappers.h"
// =====================================================================================================================
// common defs for Apple/FreeBSD/Linux
extern const char *os_type;
#define os_get_system_cpus() os_get_system_cpus_cached(true, false)
#define os_get_system_cpus_uncached() os_get_system_cpus_cached(false, false)
long os_get_system_cpus_cached(bool cache, bool for_netdata);
unsigned long os_read_cpuset_cpus(const char *filename, long system_cpus);
extern unsigned int system_hz;
void os_get_system_HZ(void);
#endif //NETDATA_OS_H
|