Debian Codegraph @

psutil/arch/aix/common.h

raw
1 /*
2 * Copyright (c) 2017, Arnon Yaari
3 * All rights reserved.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef __PSUTIL_AIX_COMMON_H__
9 #define __PSUTIL_AIX_COMMON_H__
10
11 #include <sys/core.h>
12
13 #define PROCINFO_INCR (256)
14 #define PROCSIZE (sizeof(struct procentry64))
15 #define FDSINFOSIZE (sizeof(struct fdsinfo64))
16 #define KMEM "/dev/kmem"
17
18 typedef u_longlong_t KA_T;
19
20 /* psutil_kread() - read from kernel memory */
21 int psutil_kread(int Kd, /* kernel memory file descriptor */
22 KA_T addr, /* kernel memory address */
23 char *buf, /* buffer to receive data */
24 size_t len); /* length to read */
25
26 struct procentry64 *
27 psutil_read_process_table(
28 int * num /* out - number of processes read */
29 );
30
31 #endif /* __PSUTIL_AIX_COMMON_H__ */