Synesis Software

Resource Usage API
[Synesis Software UNIX Emulation for Win32]


Detailed Description

Resource usage functions and types.


Classes

struct  unixem_rusage
 Resource usage information structure. More...

Defines

#define RUSAGE_SELF   (UNIXEM_RUSAGE_SELF)
 Requests that rusage() provide information about the calling process.
#define RUSAGE_CHILDREN   (UNIXEM_RUSAGE_CHILDREN)
 Requests that rusage() provide information about child processes of the calling process.
#define rusage   unixem_rusage
 Results structure for getrusage().
#define UNIXEM_RUSAGE_SELF   (0)
 Requests that rusage() provide information about the calling process.
#define UNIXEM_RUSAGE_CHILDREN   (-1)
 Requests that rusage() provide information about child processes of the calling process.

Functions

int getrusage (int who, struct rusage *r_usage)
 Provide resource usage information.
int unixem_getrusage (int who, struct unixem_rusage *r_usage)
 Provide resource usage information.


Define Documentation

#define rusage   unixem_rusage

Results structure for getrusage().

See also:
unixem_getrusage

#define RUSAGE_CHILDREN   (UNIXEM_RUSAGE_CHILDREN)

Requests that rusage() provide information about child processes of the calling process.

Note:
This flag is not supported

#define RUSAGE_SELF   (UNIXEM_RUSAGE_SELF)

Requests that rusage() provide information about the calling process.

#define UNIXEM_RUSAGE_CHILDREN   (-1)

Requests that rusage() provide information about child processes of the calling process.

Note:
This flag is not supported

#define UNIXEM_RUSAGE_SELF   (0)

Requests that rusage() provide information about the calling process.

Referenced by unixem_getrusage().


Function Documentation

int getrusage ( int  who,
struct rusage *  r_usage 
)

Provide resource usage information.

Retrieves resource usage information about the given process(es).

Parameters:
who The process(es) about which the usage information is to be retrieved. One of RUSAGE_SELF or RUSAGE_CHILDREN.
r_usage Pointer to an rusage structure to receive the rusage information.
Note:
This implementation only supports the RUSAGE_SELF flag for the who parameter.

This is a macro, which resolves to unixem_getrusage()

int unixem_getrusage ( int  who,
struct unixem_rusage r_usage 
)

Provide resource usage information.

Retrieves resource usage information about the given process(es).

Parameters:
who The process(es) about which the usage information is to be retrieved. One of UNIXEM_RUSAGE_SELF or UNIXEM_RUSAGE_CHILDREN.
r_usage Pointer to a unixem_rusage structure to receive the rusage information.
Note:
This implementation only supports the RUSAGE_SELF flag for the who parameter.

References unixem_rusage::ru_stime, unixem_rusage::ru_utime, unixem_internal_errno_from_Win32(), and UNIXEM_RUSAGE_SELF.


UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2002-2010