• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _SYS_SYSINFO_H
2 #define _SYS_SYSINFO_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #if !defined (__linux__) || !defined(STANDARD_SYSTEM)
9 #define SI_LOAD_SHIFT 16
10 
11 struct sysinfo {
12 	unsigned long uptime;
13 	unsigned long loads[3];
14 	unsigned long totalram;
15 	unsigned long freeram;
16 	unsigned long sharedram;
17 	unsigned long bufferram;
18 	unsigned long totalswap;
19 	unsigned long freeswap;
20 	unsigned short procs, pad;
21 	unsigned long totalhigh;
22 	unsigned long freehigh;
23 	unsigned mem_unit;
24 	char __reserved[256];
25 };
26 #else
27 #include <linux/sysinfo.h>
28 #endif
29 
30 int sysinfo (struct sysinfo *);
31 int get_nprocs_conf (void);
32 int get_nprocs (void);
33 long get_phys_pages (void);
34 long get_avphys_pages (void);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif
41