Remove PID_SELF_MAGIC constant
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user