This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH] sysinfo
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Fri, 6 May 2011 10:11:14 +0200
- Subject: Re: [PATCH] sysinfo
- References: <1304658552.5468.7.camel@YAAKOV04>
- Reply-to: cygwin-patches at cygwin dot com
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