Remove PID_SELF_MAGIC constant

This commit is contained in:
2025-09-06 09:50:04 +02:00
parent 3b18f56376
commit 643d692259
2 changed files with 2 additions and 4 deletions

View File

@ -6,14 +6,12 @@
#include "util/util.h" #include "util/util.h"
#include "sysdefs/processctl.h" #include "sysdefs/processctl.h"
#define PID_SELF_MAGIC 0x5E1F
int32_t SYSCALL3(sys_processctl, pid1, cmd1, optsptr1) { int32_t SYSCALL3(sys_processctl, pid1, cmd1, optsptr1) {
uint64_t pid = pid1; uint64_t pid = pid1;
uint64_t cmd = cmd1; uint64_t cmd = cmd1;
int32_t ret = E_OK; int32_t ret = E_OK;
if (pid == PID_SELF_MAGIC) { if (pid == -1) {
pid = PROCS.current->pid; pid = PROCS.current->pid;
} }

View File

@ -7,6 +7,6 @@ _start:
call _premain call _premain
movq $2, %rax // sys processctl movq $2, %rax // sys processctl
movq $0x5E1F, %rdi // self magic num movq $-1, %rdi // self magic num
movq $0, %rsi // kill cmd movq $0, %rsi // kill cmd
int $0x80 int $0x80