man Pages(2): System Calls
只搜寻这本书
以 PDF 格式下载本书

NAME

_lwp_info - return the time-accounting information of a single LWP

SYNOPSIS

#include <sys/time.h>
#include <sys/lwp.h>

int _lwp_info(struct lwpinfo * buffer);

DESCRIPTION

_lwp_info( ) fills the lwpinfo structure pointed to by buffer with time-accounting information pertaining to the calling LWP. This call may be extended in the future to return other information to the lwpinfo structure as needed. The lwpinfo structure in <sys/lwp.h> includes the following members:
timestruc_tlwp_utime;
timestruc_tlwp_stime;

lwp_utime is the CPU time used while executing instructions in the user space of the calling LWP.
lwp_stime is the CPU time used by the system on behalf of the calling LWP.

RETURN VALUES

Upon successful completion, _lwp_info( ) returns 0 and fills in the lwpinfo structure pointed to by buffer.

ERRORS

If the following condition is detected, _lwp_info( ) returns the corresponding value:
EFAULT
buffer points to an illegal address.

SEE ALSO

times(2)