XenevaOS
Loading...
Searching...
No Matches
_keproc.h
Go to the documentation of this file.
1
32#ifndef __KE_PROC_H__
33#define __KE_PROC_H__
34
35#include <stdint.h>
36#include <_xeneva.h>
37#include <sys/_kesignal.h>
38
39#ifdef __cplusplus
41#endif
42
53
58 typedef struct _sys_proc_list_ {
59 int proc_id;
60 char name[16];
67
73
79
85
90
98
107 XE_LIB int _KeCreateProcess(int parent_id, char* name);
108
118 XE_LIB int _KeProcessLoadExec(int proc_id, char* filename, int argc, char** argv);
119
126
134
141 XE_LIB int _KeSetSignal(int signo, XESigHandler handler);
142
148
153 XE_LIB int _KeCreateThread(void (*entry)(), char* name);
154
162 XE_LIB int _KeSetFileToProcess(int fileno, int dest_fidx, int proc_id);
163
169 XE_LIB int _KeSendSignal(int pid, int signum);
170
177 XE_LIB int _KeProcessGetFileDesc(const char* filename);
178
184
191
198
204
206
207 XE_LIB int _KeProcessFetch(XEProcessList * list, int num_proc_count);
208
209#ifdef __cplusplus
210}
211#endif
212
213#endif
XEProcessList * list
Definition main.cpp:27
XE_LIB int _KeSetFileToProcess(int fileno, int dest_fidx, int proc_id)
_KeSetFileToProcess – copies a file from one process to other
XE_LIB int _KeProcessGetFileDesc(const char *filename)
XE_LIB int _KeProcessExit()
_KeProcessExit – exits current process
XE_LIB int _KeProcessWaitForTermination(int pid)
_KeProcessWaitForTermination – suspends currently running process until another process state changes
XE_LIB int _KeProcessSleep(uint64_t ms)
_KeProcessSleep – put the current process main thread to sleep mode 1s = 10000 ms
XE_LIB int _KeSendSignal(int pid, int signum)
_KeSendSignal – send a signal to desired process
XE_LIB uint16_t _KeGetThreadID()
_KeGetThreadID – get currently running thread id
XE_LIB int _KeGetProcessID()
_KeGetProcessID – get currently running process id
XE_LIB uint64_t _KeGetEnvironmentBlock()
_KeGetEnvironmentBlock – returns the current environment block of the process
XE_LIB int _KeSetSignal(int signo, XESigHandler handler)
_KeSetSignal – register a new signal handler for this process
XE_LIB int _KeCreateThread(void(*entry)(), char *name)
_KeCreateThread – creates a new thread inside current process slot
XE_LIB int _KeCreateProcess(int parent_id, char *name)
_KeCreateProcess – create a new process slot by taking
XE_LIB int _KeProcessTokenRemoveSelf(uint8_t category)
_KeProcessTokenRemoveSelf – remove self from a token
XE_LIB int _KeProcessLoadExec(int proc_id, char *filename, int argc, char **argv)
_KeProcessLoadExec – loads an executable to a process slot
XE_LIB int _KeProcessTokenAddSelf(uint8_t category)
XE_LIB size_t _KeGetSystemTimerTick()
_KeGetSystemTimerTick – returns the current system timer tick
struct _sys_proc_list_ XEProcessList
XE_LIB int _KePauseThread()
_KePauseThread – pause currently running thread
XE_LIB uint64_t _KeGetProcessHeapMem(size_t sz)
_KeGetProcessHeapMem – Grabs some memory from heap memory of current process slot
XE_LIB int _KeGetNumProcessCount()
XE_LIB int _KeProcessTokenGetThreadID(uint8_t category)
_KeProcessTokenGetThreadID – get the thread id of a slot
@ PROCESS_TOKEN_NETWORK
Definition _keproc.h:47
@ PROCESS_TOKEN_AUDIO
Definition _keproc.h:49
@ PROCESS_TOKEN_NETSERVER
Definition _keproc.h:51
@ PROCESS_TOKEN_DEV
Definition _keproc.h:50
@ PROCESS_TOKEN_DISPLAY
Definition _keproc.h:48
XE_LIB int _KeProcessFetch(XEProcessList *list, int num_proc_count)
void(* XESigHandler)(int signum)
Definition _kesignal.h:105
#define XE_LIB
Definition _xeneva.h:55
#define XE_EXTERN
Definition _xeneva.h:50
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
unsigned short int uint16_t
Definition acefiex.h:162
void(* entry)(void *)
Definition process.h:98
_proc_tokens_
Definition proctoken.h:50
Definition process.h:112
uint64_t window_runtime_us
Definition process.h:116
int proc_id
Definition process.h:113
char name[16]
Definition process.h:114
uint32_t num_threads
Definition process.h:117
uint32_t cpu_usage
Definition process.h:119
uint64_t total_runtime_us
Definition process.h:115
uint32_t num_file_opened
Definition process.h:118