mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-03 03:19:16 +00:00
feat(kernel/syscalls): implement semi-stub linux_sysinfo
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -428,4 +428,23 @@ typedef struct cpu_set_t
|
||||
#define CPU_SET(i, set) CPU_BIT_OP(i, sizeof(cpu_set_t), set, |=)
|
||||
#define CPU_ZERO(set) (memset((set), 0, sizeof(cpu_set_t)))
|
||||
|
||||
/* taken from https://man7.org/linux/man-pages/man2/sysinfo.2.html */
|
||||
struct sysinfo
|
||||
{
|
||||
long uptime; /* Seconds since boot */
|
||||
unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
|
||||
unsigned long totalram; /* Total usable main memory size */
|
||||
unsigned long freeram; /* Available memory size */
|
||||
unsigned long sharedram; /* Amount of shared memory */
|
||||
unsigned long bufferram; /* Memory used by buffers */
|
||||
unsigned long totalswap; /* Total swap space size */
|
||||
unsigned long freeswap; /* Swap space still available */
|
||||
unsigned short procs; /* Number of current processes */
|
||||
unsigned long totalhigh; /* Total high memory size */
|
||||
unsigned long freehigh; /* Available high memory size */
|
||||
unsigned int mem_unit; /* Memory unit size in bytes */
|
||||
|
||||
char _f[20 - 2 * sizeof(long) - sizeof(int)]; /* Padding to 64 bytes */
|
||||
};
|
||||
|
||||
#endif // !__FENNIX_KERNEL_LINUX_DEFS_H__
|
||||
|
Reference in New Issue
Block a user