_lwp_info() not available for hpux-ia64
This commit is contained in:
parent
36fc25dab6
commit
3c4d18e04e
@ -22,7 +22,9 @@
|
||||
#include "sigar_os.h"
|
||||
|
||||
#include <sys/dk.h>
|
||||
#ifndef __ia64__
|
||||
#include <sys/lwp.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
@ -450,6 +452,13 @@ int sigar_thread_cpu_get(sigar_t *sigar,
|
||||
sigar_uint64_t id,
|
||||
sigar_thread_cpu_t *cpu)
|
||||
{
|
||||
#ifdef __ia64__
|
||||
/* XXX seems _lwp funcs were for solaris compat and dont exist
|
||||
* on itanium. hp docs claim that have equiv functions,
|
||||
* but wtf is it for _lwp_info?
|
||||
*/
|
||||
return SIGAR_ENOTIMPL;
|
||||
#else
|
||||
struct lwpinfo info;
|
||||
|
||||
if (id != 0) {
|
||||
@ -463,6 +472,7 @@ int sigar_thread_cpu_get(sigar_t *sigar,
|
||||
cpu->total = TIME_NSEC(info.lwp_utime) + TIME_NSEC(info.lwp_stime);
|
||||
|
||||
return SIGAR_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
#include <mntent.h>
|
||||
|
@ -19,6 +19,10 @@
|
||||
#ifndef SIGAR_OS_H
|
||||
#define SIGAR_OS_H
|
||||
|
||||
#if defined(__ia64) && !defined(__ia64__)
|
||||
#define __ia64__
|
||||
#endif
|
||||
|
||||
#include <sys/pstat.h>
|
||||
#include <sys/mib.h>
|
||||
#include <stdlib.h>
|
||||
|
Loading…
Reference in New Issue
Block a user