ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/tools.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/tools.c (file contents):
Revision 1.58 by ats, Mon Nov 1 20:34:58 2004 UTC vs.
Revision 1.59 by ats, Sat Nov 6 14:55:53 2004 UTC

# Line 42 | Line 42
42   #include <sys/param.h>
43   #include <sys/sysctl.h>
44   #endif
45 + #ifdef HPUX
46 + #include <sys/param.h>
47 + #include <sys/pstat.h>
48 + #endif
49  
50   #include "tools.h"
51   #include "statgrab.h"
# Line 486 | Line 490 | struct uvmexp *sg_get_uvmexp() {
490          }
491  
492          return &uvm;
493 + }
494 + #endif
495 +
496 + #ifdef HPUX
497 + struct pst_static *sg_get_pstat_static() {
498 +        static int got = 0;
499 +        static struct pst_static pst;
500 +
501 +        if (!got) {
502 +                if (pstat_getstatic(&pst, sizeof pst, 1, 0) == -1) {
503 +                        sg_set_error_with_errno(SG_ERROR_PSTAT,
504 +                                                "pstat_static");
505 +                        return NULL;
506 +                }
507 +                got = 1;
508 +        }
509 +        return &pst;
510   }
511   #endif
512  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines