'\" te .\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved .TH _lwp_info 2 "8 Aug 2001" "SunOS 5.11" "System Calls" .SH NAME _lwp_info \- return the time-accounting information of a single LWP .SH SYNOPSIS .LP .nf #include #include \fBint\fR \fB_lwp_info\fR(\fBstruct lwpinfo *\fR\fIbuffer\fR); .fi .SH DESCRIPTION .sp .LP The \fB_lwp_info()\fR function fills the \fBlwpinfo\fR structure pointed to by \fIbuffer\fR with time-accounting information pertaining to the calling LWP. This call may be extended in the future to return other information to the \fBlwpinfo\fR structure as needed. The \fBlwpinfo\fR structure in <\fBsys/lwp.h\fR> includes the following members: .sp .in +2 .nf timestruc_t lwp_utime; timestruc_t lwp_stime; .fi .in -2 .sp .LP The \fBlwp_utime\fR member is the CPU time used while executing instructions in the user space of the calling LWP. .sp .LP The \fBlwp_stime\fR member is the CPU time used by the system on behalf of the calling LWP. .SH RETURN VALUES .sp .LP Upon successful completion, \fB_lwp_info()\fR returns \fB0\fR and fills in the \fBlwpinfo\fR structure pointed to by \fIbuffer\fR. .SH ERRORS .sp .LP If the following condition is detected, \fB_lwp_info()\fR returns the corresponding value: .sp .ne 2 .mk .na \fB\fBEFAULT\fR\fR .ad .RS 10n .rt The \fIbuffer\fR argument points to an illegal address. .RE .sp .LP Additionally, the \fB_lwp_info()\fR function will fail for 32-bit interfaces if: .sp .ne 2 .mk .na \fB\fBEOVERFLOW\fR\fR .ad .RS 13n .rt The size of the \fBtv_sec\fR member of the \fBtimestruc_t\fR type pointed to by \fBlwp_utime\fR and \fBlwp_stime\fR is too small to contain the correct number of seconds. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT-LevelAsync-Signal-Safe .TE .SH SEE ALSO .sp .LP \fBtimes\fR(2), \fBattributes\fR(5)