Split processctl() syscall into multiple smaller ones
This commit is contained in:
15
share/sysdefs/proc.h
Normal file
15
share/sysdefs/proc.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef SHARE_SYSDEFS_PROC_H_
|
||||
#define SHARE_SYSDEFS_PROC_H_
|
||||
|
||||
#define PROC_ARG_MAX 128
|
||||
|
||||
typedef struct {
|
||||
uint64_t pid;
|
||||
char name[0x100];
|
||||
uint8_t state;
|
||||
size_t usemem;
|
||||
} ProcStat;
|
||||
|
||||
typedef uint64_t PID_t;
|
||||
|
||||
#endif // SHARE_SYSDEFS_PROC_H_
|
||||
@ -1,29 +0,0 @@
|
||||
#ifndef SHARE_HDRS_PROCESSCTL_H_
|
||||
#define SHARE_HDRS_PROCESSCTL_H_
|
||||
|
||||
#define PROC_ARG_MAX 128
|
||||
|
||||
#define PCTL_KILL 0
|
||||
#define PCTL_SPAWN 1
|
||||
#define PCTL_POLLSTATE 2
|
||||
#define PCTL_RUN 3
|
||||
#define PCTL_GETPID 4
|
||||
#define PCTL_ARGLEN 5
|
||||
#define PCTL_ARGV 6
|
||||
#define PCTL_PLS_SZ 7
|
||||
#define PCTL_PLS_STAT 8
|
||||
|
||||
#if !defined(__ASSEMBLER__)
|
||||
|
||||
typedef struct {
|
||||
uint64_t pid;
|
||||
char name[0x100];
|
||||
uint8_t state;
|
||||
size_t usemem;
|
||||
} ProcStat;
|
||||
|
||||
typedef uint64_t PID_t;
|
||||
|
||||
#endif
|
||||
|
||||
#endif // SHARE_HDRS_PROCESSCTL_H_
|
||||
@ -2,7 +2,6 @@
|
||||
#define SHARE_HDRS_SYSCALL_H_
|
||||
|
||||
#define SYS_DEBUGPRINT 1
|
||||
#define SYS_PROCESSCTL 2
|
||||
#define SYS_IOCTL 3
|
||||
#define SYS_MMAN_MAP 5
|
||||
#define SYS_MMAN_UNMAP 6
|
||||
@ -16,6 +15,15 @@
|
||||
#define SYS_IPC_PIPEMAKE 14
|
||||
#define SYS_IPC_PIPEDELETE 15
|
||||
#define SYS_IPC_PIPECONNECT 16
|
||||
#define SYS_PROC_KILL 17
|
||||
#define SYS_PROC_SPAWN 18
|
||||
#define SYS_PROC_POLLSTATE 19
|
||||
#define SYS_PROC_RUN 20
|
||||
#define SYS_PROC_GETPID 21
|
||||
#define SYS_PROC_ARGLEN 22
|
||||
#define SYS_PROC_ARGV 23
|
||||
#define SYS_PROC_LISTSIZE 24
|
||||
#define SYS_PROC_STAT 25
|
||||
|
||||
|
||||
#endif // SHARE_HDRS_SYSCALL_H_
|
||||
|
||||
Reference in New Issue
Block a user