diff options
author | Ian Moffett <ian@osmora.org> | 2025-05-15 17:41:29 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-05-15 18:01:30 -0400 |
commit | 02ca8f9faf6b6ddd0b7a514503b223e9ecbe8fe9 (patch) | |
tree | 905c09181f3ac1026b6d800c9151af527753665e /sys/arch | |
parent | 7c40f732d616a7a2bd005c51ca86d609c2dc4788 (diff) |
kernel: proc: Do not introduce fork()main
Simplicity is divine, fork() may be powerful but is no longer simple. It
became a thing in the late 70s during the early days of UNIX when computing
was simple, when CPUs were only 16-bits, MMUs were not prevalent and RAM was
only 512 KB. However it isn't 1971 anymore, process management, CPUs and memory
architecture has advanced significantly since. This commit ceases work on the
fork() syscall as implementing it would only introduce unnecessary complexity,
security issues, hefty processing overhead and would perpetuate what should
now be considered legacy. The current best alternative would be providing
a form of process spawning as well as a mechanism to wait for the child
process to complete.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/proc_machdep.c | 2 | ||||
-rw-r--r-- | sys/arch/amd64/isa/i8042.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/proc_machdep.c b/sys/arch/amd64/amd64/proc_machdep.c index 0be85fd..9579b7e 100644 --- a/sys/arch/amd64/amd64/proc_machdep.c +++ b/sys/arch/amd64/amd64/proc_machdep.c @@ -155,7 +155,7 @@ md_td_kick(struct proc *td) * @ip: Instruction pointer. */ int -md_fork(struct proc *p, struct proc *parent, uintptr_t ip) +md_spawn(struct proc *p, struct proc *parent, uintptr_t ip) { uintptr_t stack_base; struct trapframe *tfp; diff --git a/sys/arch/amd64/isa/i8042.c b/sys/arch/amd64/isa/i8042.c index 89bebc5..46a8d19 100644 --- a/sys/arch/amd64/isa/i8042.c +++ b/sys/arch/amd64/isa/i8042.c @@ -436,7 +436,7 @@ i8042_init(void) quirks |= I8042_HOSTILE; pr_trace("lenovo device, assuming hostile\n"); pr_trace("disabling irq 1, polling as fallback\n"); - fork1(&polltd, 0, i8042_sync_loop, NULL); + spawn(&polltd, 0, i8042_sync_loop, NULL); } if (!ISSET(quirks, I8042_HOSTILE)) { |