libc/include/sys/resource.h: Add RUSAGE_THREAD

Message ID 20240708222425.664-1-joel@rtems.org
State New
Headers
Series libc/include/sys/resource.h: Add RUSAGE_THREAD |

Commit Message

Joel Sherrill July 8, 2024, 10:24 p.m. UTC
  ---
 newlib/libc/include/sys/resource.h | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Corinna Vinschen July 9, 2024, 10:33 a.m. UTC | #1
On Jul  8 17:24, Joel Sherrill wrote:
> ---
>  newlib/libc/include/sys/resource.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/newlib/libc/include/sys/resource.h b/newlib/libc/include/sys/resource.h
> index c0a0d2019..e653d08ee 100644
> --- a/newlib/libc/include/sys/resource.h
> +++ b/newlib/libc/include/sys/resource.h
> @@ -9,6 +9,9 @@ extern "C" {
>  
>  #define	RUSAGE_SELF	0		/* calling process */
>  #define	RUSAGE_CHILDREN	-1		/* terminated child processes */
> +#if __GNU_VISIBLE
> +#define	RUSAGE_THREAD	1
> +#endif
>  
>  struct rusage {
>    	struct timeval ru_utime;	/* user time used */
> -- 
> 2.24.4

LGTM, please push.

Thanks,
Corinna
  
Joel Sherrill July 9, 2024, 1:47 p.m. UTC | #2
Thanks. Pushed.

On Tue, Jul 9, 2024 at 5:33 AM Corinna Vinschen <vinschen@redhat.com> wrote:

> On Jul  8 17:24, Joel Sherrill wrote:
> > ---
> >  newlib/libc/include/sys/resource.h | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/newlib/libc/include/sys/resource.h
> b/newlib/libc/include/sys/resource.h
> > index c0a0d2019..e653d08ee 100644
> > --- a/newlib/libc/include/sys/resource.h
> > +++ b/newlib/libc/include/sys/resource.h
> > @@ -9,6 +9,9 @@ extern "C" {
> >
> >  #define      RUSAGE_SELF     0               /* calling process */
> >  #define      RUSAGE_CHILDREN -1              /* terminated child
> processes */
> > +#if __GNU_VISIBLE
> > +#define      RUSAGE_THREAD   1
> > +#endif
> >
> >  struct rusage {
> >       struct timeval ru_utime;        /* user time used */
> > --
> > 2.24.4
>
> LGTM, please push.
>
> Thanks,
> Corinna
>
>
  

Patch

diff --git a/newlib/libc/include/sys/resource.h b/newlib/libc/include/sys/resource.h
index c0a0d2019..e653d08ee 100644
--- a/newlib/libc/include/sys/resource.h
+++ b/newlib/libc/include/sys/resource.h
@@ -9,6 +9,9 @@  extern "C" {
 
 #define	RUSAGE_SELF	0		/* calling process */
 #define	RUSAGE_CHILDREN	-1		/* terminated child processes */
+#if __GNU_VISIBLE
+#define	RUSAGE_THREAD	1
+#endif
 
 struct rusage {
   	struct timeval ru_utime;	/* user time used */