DarwinProcessList.h 997 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
/* Do not edit this file. It was automatically generated. */

#ifndef HEADER_DarwinProcessList
#define HEADER_DarwinProcessList
/*
htop - DarwinProcessList.h
(C) 2014 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/

David Hunt's avatar
David Hunt committed
12
13
#include <mach/mach_host.h>
#include <sys/sysctl.h>
14

David Hunt's avatar
David Hunt committed
15
16
17
typedef struct DarwinProcessList_ {
   ProcessList super;

David Hunt's avatar
David Hunt committed
18
   host_basic_info_data_t host_info;
David Hunt's avatar
David Hunt committed
19
20
   processor_cpu_load_info_t prev_load;
   processor_cpu_load_info_t curr_load;
David Hunt's avatar
David Hunt committed
21
22
23
24
25
} DarwinProcessList;


void ProcessList_getHostInfo(host_basic_info_data_t *p);

David Hunt's avatar
David Hunt committed
26
27
28
void ProcessList_freeCPULoadInfo(processor_cpu_load_info_t *p);

unsigned ProcessList_allocateCPULoadInfo(processor_cpu_load_info_t *p);
David Hunt's avatar
David Hunt committed
29
30

struct kinfo_proc *ProcessList_getKInfoProcs(size_t *count);
31
32
33
34
35
36
37
38

ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);

void ProcessList_delete(ProcessList* this);

void ProcessList_goThroughEntries(ProcessList* super);

#endif