diff options
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 3 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/sysinfo.h | 19 |
2 files changed, 20 insertions, 2 deletions
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 7a2974945..ef92244ad 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -408,12 +408,13 @@ details. */ 241: Export pthread_attr_getstack, pthread_attr_getstackaddr, pthread_getattr_np. 242: Export psiginfo, psignal, sys_siglist. + 243: Export sysinfo. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 242 +#define CYGWIN_VERSION_API_MINOR 243 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible diff --git a/winsup/cygwin/include/sys/sysinfo.h b/winsup/cygwin/include/sys/sysinfo.h index 1e24c860a..693e7b593 100644 --- a/winsup/cygwin/include/sys/sysinfo.h +++ b/winsup/cygwin/include/sys/sysinfo.h @@ -1,6 +1,6 @@ /* sys/sysinfo.h - Copyright 2009 Red Hat, Inc. + Copyright 2009, 2011 Red Hat, Inc. This file is part of Cygwin. @@ -17,6 +17,23 @@ details. */ __BEGIN_DECLS +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 __unused[10]; /* Pads structure to 64 bytes */ +}; + +extern int sysinfo (struct sysinfo *); extern int get_nprocs_conf (void); extern int get_nprocs (void); extern long get_phys_pages (void); |