Lines 22-33
Link Here
|
22 |
#include <ganglia/gexec_process.h> |
22 |
#include <ganglia/gexec_process.h> |
23 |
#include <ganglia/file.h> |
23 |
#include <ganglia/file.h> |
24 |
#include <sys/param.h> /* for HZ */ |
24 |
#include <sys/param.h> /* for HZ */ |
25 |
#include <asm/page.h> /* for PAGE_SHIFT */ |
|
|
26 |
#include <pthread.h> |
25 |
#include <pthread.h> |
27 |
|
26 |
|
28 |
/* useful macros */ |
27 |
/* useful macros */ |
|
|
28 |
#define PAGE_SIZE (sysconf(_SC_PAGESIZE)) |
29 |
#define bytetok(x) (((x) + 512) >> 10) |
29 |
#define bytetok(x) (((x) + 512) >> 10) |
30 |
#define pagetok(x) ((x) << (PAGE_SHIFT - 10)) |
30 |
#define pagetok(x) ((x) * (PAGE_SIZE >> 10)) |
31 |
|
31 |
|
32 |
typedef struct |
32 |
typedef struct |
33 |
{ |
33 |
{ |