blob: 241e9ba4b5ee5c64774d52ab0f8ba87307536a1c [file] [log] [blame] [raw]
/* Do not edit this file. It was automatically generated. */
#ifndef HEADER_darwin_DarwinProcess
#define HEADER_darwin_DarwinProcess
/*
htop - darwin/DarwinProcess.h
(C) 2015 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#ifdef HAVE_LIBPROC
#endif
#include "DarwinProcessList.h"
#include "Settings.h"
#include <stdbool.h>
#include <stdint.h>
typedef struct DarwinProcess_ {
Process super;
bool is_kernel_process;
bool libproc_accessible;
bool mach_task_accessible;
uint64_t utime;
uint64_t stime;
} DarwinProcess;
extern ProcessClass DarwinProcess_class;
DarwinProcess* DarwinProcess_new(Settings* settings);
void Process_delete(Object* cast);
bool Process_isKernelProcess(const Process* this);
bool Process_isExtraThreadProcess(const Process* this);
void DarwinProcess_setStartTime(Process *proc, const struct extern_proc *ep, time_t now);
char *DarwinProcess_getCmdLine(const struct kinfo_proc *k, int* argv0_length);
void DarwinProcess_setFromKInfoProc(Process *proc, const struct kinfo_proc *ps, const ProcessList *pl, time_t now, bool exists);
void DarwinProcess_setFromLibprocPidinfo(DarwinProcess *proc, DarwinProcessList *dpl);
/*
* Scan threads for process state information.
* Based on: http://stackoverflow.com/questions/6788274/ios-mac-cpu-usage-for-thread
* and https://github.com/max-horvath/htop-osx/blob/e86692e869e30b0bc7264b3675d2a4014866ef46/ProcessList.c
*/
void DarwinProcess_setFromMachTaskInfo(DarwinProcess *dp, DarwinProcessList *dpl);
char **Process_getKernelStackTrace(const Process *this);
#endif