Implement getloadavg()
v2: autoload PerfDataHelper functions Keep loadavg in shared memory Guard loadavg access by a mutex Initialize loadavg to the current load v3: Shared memory version bump isn't needed if we are only extending it Remove unused autoload Mark inititalized flags as NO_COPY for correct behaviour in fork child Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
This commit is contained in:
@@ -77,6 +77,10 @@ extern _PTR valloc _PARAMS ((size_t));
|
||||
#undef _mstats_r
|
||||
#define _mstats_r(r, p) mstats (p)
|
||||
|
||||
#if __BSD_VISIBLE
|
||||
int getloadavg(double loadavg[], int nelem);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -473,12 +473,13 @@ details. */
|
||||
306: Export getentropy, getrandom.
|
||||
307: Export timingsafe_bcmp, timingsafe_memcmp.
|
||||
308: Export dladdr.
|
||||
309: Export getloadavg.
|
||||
|
||||
Note that we forgot to bump the api for ualarm, strtoll, strtoull,
|
||||
sigaltstack, sethostname. */
|
||||
|
||||
#define CYGWIN_VERSION_API_MAJOR 0
|
||||
#define CYGWIN_VERSION_API_MINOR 308
|
||||
#define CYGWIN_VERSION_API_MINOR 309
|
||||
|
||||
/* There is also a compatibity version number associated with the shared memory
|
||||
regions. It is incremented when incompatible changes are made to the shared
|
||||
|
Reference in New Issue
Block a user