From 11ecd9cf07883f4bd3276b3e87ed97a730a65481 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 7 Jan 2005 00:09:23 +0000 Subject: [PATCH] pthread_getrusage_np wrapper --- src/os/aix/perfstat/sigar_perfstat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/os/aix/perfstat/sigar_perfstat.c b/src/os/aix/perfstat/sigar_perfstat.c index a848e3ea..5cafbd29 100644 --- a/src/os/aix/perfstat/sigar_perfstat.c +++ b/src/os/aix/perfstat/sigar_perfstat.c @@ -1,4 +1,5 @@ #include +#include /* * ibm docs say: @@ -25,3 +26,12 @@ int sigar_perfstat_pagingspace(perfstat_id_t *id, { return perfstat_pagingspace(id, pagingspace, size, num); } + +/* + * not a perfstat function, but from libpthreads.a + * requires the same tricks to link on 4.3 and run on 5.2 + */ +int sigar_thread_rusage(struct rusage *usage, int mode) +{ + return pthread_getrusage_np(pthread_self(), usage, mode); +}