getrusage.2: _GNU_SOURCE must be defined to obtain RUSAGE_THREAD definition

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746569

Reported-by: Bill Allombert <ballombe@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-05-01 21:19:45 +02:00
parent 7f26d07561
commit 1205c84585
1 changed files with 8 additions and 1 deletions

View File

@ -36,7 +36,7 @@
.\" document ru_maxrss
.\" 2010-05-24, mtk, enhanced description of various fields
.\"
.TH GETRUSAGE 2 2010-09-26 "Linux" "Linux Programmer's Manual"
.TH GETRUSAGE 2 2014-05-01 "Linux" "Linux Programmer's Manual"
.SH NAME
getrusage \- get resource usage
.SH SYNOPSIS
@ -65,6 +65,13 @@ if all of the intervening descendants waited on their terminated children.
.TP
.BR RUSAGE_THREAD " (since Linux 2.6.26)"
Return resource usage statistics for the calling thread.
The
.B _GNU_SOURCE
feature test macro must be defined (before including
.I any
header file)
in order to obtain the definition of this constant from
.IR <sys/resource.h> .
.PP
The resource usages are returned in the structure pointed to by
.IR usage ,