1570af302Sopenharmony_ci#ifndef _SYS_SYSINFO_H 2570af302Sopenharmony_ci#define _SYS_SYSINFO_H 3570af302Sopenharmony_ci 4570af302Sopenharmony_ci#ifdef __cplusplus 5570af302Sopenharmony_ciextern "C" { 6570af302Sopenharmony_ci#endif 7570af302Sopenharmony_ci 8570af302Sopenharmony_ci#if !defined (__linux__) || !defined(STANDARD_SYSTEM) 9570af302Sopenharmony_ci#define SI_LOAD_SHIFT 16 10570af302Sopenharmony_ci 11570af302Sopenharmony_cistruct sysinfo { 12570af302Sopenharmony_ci unsigned long uptime; 13570af302Sopenharmony_ci unsigned long loads[3]; 14570af302Sopenharmony_ci unsigned long totalram; 15570af302Sopenharmony_ci unsigned long freeram; 16570af302Sopenharmony_ci unsigned long sharedram; 17570af302Sopenharmony_ci unsigned long bufferram; 18570af302Sopenharmony_ci unsigned long totalswap; 19570af302Sopenharmony_ci unsigned long freeswap; 20570af302Sopenharmony_ci unsigned short procs, pad; 21570af302Sopenharmony_ci unsigned long totalhigh; 22570af302Sopenharmony_ci unsigned long freehigh; 23570af302Sopenharmony_ci unsigned mem_unit; 24570af302Sopenharmony_ci char __reserved[256]; 25570af302Sopenharmony_ci}; 26570af302Sopenharmony_ci#else 27570af302Sopenharmony_ci#include <linux/sysinfo.h> 28570af302Sopenharmony_ci#endif 29570af302Sopenharmony_ci 30570af302Sopenharmony_ciint sysinfo (struct sysinfo *); 31570af302Sopenharmony_ciint get_nprocs_conf (void); 32570af302Sopenharmony_ciint get_nprocs (void); 33570af302Sopenharmony_cilong get_phys_pages (void); 34570af302Sopenharmony_cilong get_avphys_pages (void); 35570af302Sopenharmony_ci 36570af302Sopenharmony_ci#ifdef __cplusplus 37570af302Sopenharmony_ci} 38570af302Sopenharmony_ci#endif 39570af302Sopenharmony_ci 40570af302Sopenharmony_ci#endif 41