Split processctl() syscall into multiple smaller ones

This commit is contained in:
2025-10-14 16:37:36 +02:00
parent 8aec45316c
commit c34a253d11
22 changed files with 359 additions and 236 deletions

View File

@ -22,6 +22,6 @@ void pctl_kill(void) {
}
if (PCTL_KILL_CONFIG.pid != -1) {
processctl(PCTL_KILL_CONFIG.pid, PCTL_KILL, 0, 0, 0);
proc_kill(PCTL_KILL_CONFIG.pid);
}
}

View File

@ -26,7 +26,7 @@ void pctl_ls(void) {
static const char *states[] = {"embryo", "ready", "zombie", "waiting", "died"};
uint64_t procslen = processctl(-1, PCTL_PLS_SZ, 0, 0, 0);
int32_t procslen = proc_listsize();
char *namebuf = umalloc(34);
char *membuf = umalloc(20);
@ -38,7 +38,7 @@ void pctl_ls(void) {
string_memset(namebuf, 0, 34);
string_memset(membuf, 0, 20);
int32_t r = processctl(-1, PCTL_PLS_STAT, i, (uint64_t)&stat, 0);
int32_t r = proc_stat(i, &stat);
if (r == E_OK) {
if (PCTL_LS_CONFIG.specificproc != NULL
&& string_strcmp(stat.name, PCTL_LS_CONFIG.specificproc) != 0) {