pthread_getrusage_np wrapper

This commit is contained in:
Doug MacEachern 2005-01-07 00:09:23 +00:00
parent 45bef706a4
commit 11ecd9cf07
1 changed files with 10 additions and 0 deletions

View File

@ -1,4 +1,5 @@
#include <libperfstat.h> #include <libperfstat.h>
#include <pthread.h>
/* /*
* ibm docs say: * ibm docs say:
@ -25,3 +26,12 @@ int sigar_perfstat_pagingspace(perfstat_id_t *id,
{ {
return perfstat_pagingspace(id, pagingspace, size, num); 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);
}