On May 6 00:09, Yaakov (Cygwin/X) wrote: > This implements sysinfo(2), a GNU extension: > > http://www.kernel.org/doc/man-pages/online/pages/man2/sysinfo.2.html > > The code is partially based on our /proc/meminfo and /proc/uptime code. > (My next patch will port the former to use sysinfo(2), but the latter > cannot as it uses .01s resolution, more than sysinfo's 1s. That patch > will also fix /proc/meminfo and /proc/swaps for RAM and paging files > larger than 4GB.) > > Patches for winsup/cygwin and winsup/doc, plus a test program, attached. > > > Yaakov >
> 2011-05-05 Yaakov Selkowitz <yselkowitz@...> > > * sysconf.cc (sysinfo): New function. > * cygwin.din (sysinfo): Export. > * posix.sgml (std-gnu): Add sysinfo. > * include/sys/sysinfo.h (struct sysinfo): Define. > (sysinfo): Declare. > * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. That looks good to me. Just a question... > + /* FIXME: unsupported */ > + info->loads[0] = 0UL; > + info->loads[1] = 0UL; > + info->loads[2] = 0UL; > + info->sharedram = 0UL; > + info->bufferram = 0UL; Isn't bufferram the sum of paged and non-paged pool? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat