_lwp_info() not available for hpux-ia64

This commit is contained in:
Doug MacEachern 2006-08-05 00:54:53 +00:00
parent 36fc25dab6
commit 3c4d18e04e
2 changed files with 14 additions and 0 deletions

View File

@ -22,7 +22,9 @@
#include "sigar_os.h" #include "sigar_os.h"
#include <sys/dk.h> #include <sys/dk.h>
#ifndef __ia64__
#include <sys/lwp.h> #include <sys/lwp.h>
#endif
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>
@ -450,6 +452,13 @@ int sigar_thread_cpu_get(sigar_t *sigar,
sigar_uint64_t id, sigar_uint64_t id,
sigar_thread_cpu_t *cpu) 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; struct lwpinfo info;
if (id != 0) { 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); cpu->total = TIME_NSEC(info.lwp_utime) + TIME_NSEC(info.lwp_stime);
return SIGAR_OK; return SIGAR_OK;
#endif
} }
#include <mntent.h> #include <mntent.h>

View File

@ -19,6 +19,10 @@
#ifndef SIGAR_OS_H #ifndef SIGAR_OS_H
#define SIGAR_OS_H #define SIGAR_OS_H
#if defined(__ia64) && !defined(__ia64__)
#define __ia64__
#endif
#include <sys/pstat.h> #include <sys/pstat.h>
#include <sys/mib.h> #include <sys/mib.h>
#include <stdlib.h> #include <stdlib.h>