summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
AgeCommit message (Collapse)Author
2024-07-07kernel/vfs: split vfs_backend_refdown into two functionsdzwdz
2024-05-11kernel: refactor handle management out of proc.cdzwdz
2024-03-13kernel/malloc: slight rework (it's still bad), store more metadatadzwdz
2024-02-21kernel: integrate the proc_ns_next fixes into proc_nextdzwdz
2023-09-25kernel/intr: accept a message, allow killing processes via intrsdzwdz
2023-09-24kernel: delay removing processes from treedzwdz
2023-09-17kernel/proc: inline proc_switch into proc_switch_anydzwdz
2023-09-15kern: fix GDT order for 64bit sysretdzwdz
2023-09-13cmd/init: remove /initctl, use intr insteaddzwdz
2023-08-31kernel: add _sys_getprocfs in place of HANDLE_PROCFSdzwdz
This makes the side-effects more explicit, and feels less hacky than `HANDLE_PROCFS`. I don't think accessing a handle alone should have side-effects, even if it's a "special" one.
2023-08-29kernel: remove _sys_await, emulate it in libcdzwdz
2023-08-27ports: qbe, cproc :^)dzwdz
2023-06-11kernel: replace await with wait2, roughly compatible with POSIXdzwdz
dash works now :^)))
2023-06-10kernel: implement DUP_SEARCH (like unix's F_DUPFD)dzwdz
2023-06-04kernel: rework /proc/ and process IDsdzwdz
I'm yet to write proper docs but the TL;DR is: Mounting /proc/ creates a new pid namespace. You're still visible in the old namespace with your old pid, but your children won't be. You see your own pid as 1. Current pids of children will be preserved, pids will be allocated starting from the highest one of your children.
2023-01-25kernel: move /mem/alloc to /malloc and linker.ld to arch/amd64/dzwdz
2023-01-25kernel: consolidate some header filesdzwdz
2023-01-25kernel: remove accidental executable bit on proc.cdzwdz
how.
2023-01-25style: typedef structs, shorter namespacesdzwdz
I've wanted to do this for a while, and since I've just had a relatively large refactor commit (pcpy), this is as good of a time as any. Typedefing structs was mostly inspired by Plan 9's coding style. It makes some lines of code much shorter at basically no expense. Everything related to userland kept old-style struct definitions, so as not to force that style onto other people. I also considered changing SCREAMING_ENUM_FIELDS to NicerLookingCamelcase, but I didn't, just in case that'd be confusing.
2023-01-25kernel/virt: replace the virt_cpy api with a more foolproof onedzwdz
2023-01-24kernel/procfs: allow interrupting processesdzwdz
2023-01-19kernel: user interruptsdzwdz
2023-01-19kernel: delay freeing reaped processes, slightly more strict statesdzwdz
2023-01-18kernel: add a root argument to process_nextdzwdz
2023-01-11kernel: return EPIPE when fs_waiting on a dead filesystemdzwdz
2023-01-08kernel: let parents kill their children againdzwdz
2023-01-08kernel/proc: don't kill children when parent diesdzwdz
2023-01-06kernel: basic procfsdzwdz
2023-01-06kernel: turn the NULLFS into an always present special handledzwdz
preparing for HANDLE_PROCFS
2022-09-02kernel/proc: introduce child ids for telling children apartdzwdz
2022-08-30set up the stack in user/bootstrap instead of the kerneldzwdz
2022-08-28kernel/vfs: minor vfs_request / vfs_root_register reworkdzwdz
* changed vfs_root_register's name because the _mount didn't add anything * removed the old pointless vfs_backend_tryaccept calls from drivers * because of that, i could remove the vfs_backend globals * replaced the horrible BACKEND_KERN macro * all vfs_backends are now stored on the heap
2022-08-19syscall/fs_wait: return a handle for each requestdzwdz
2022-08-19syscall/fork: allow sharing handles between threadsdzwdz
2022-08-19kernel: kzallocdzwdz
2022-08-19kernel/proc: abstract away managing handlesdzwdz
2022-08-18syscall/fork: FORK_SHAREMEM for primitive "threads"dzwdz
2022-08-12kernel/proc: don't expose internal fuctions, clean up apidzwdz
2022-08-06kernel/mem: make the page bitmap cover everything after bssdzwdz
2022-08-04do some simple TODOs, organize the rest; general code maintainancedzwdz
2022-08-04syscalls: add _syscall_sleep()dzwdz
2022-08-03kernel: reuse a single allocation for all vfs_requests of a processdzwdz
$ iostress 32 512 0 > /vtty # before 512 calls, 0 bytes. avg 121133 $ iostress 32 512 0 > /vtty # after 512 calls, 0 bytes. avg 103540 103540/121133 = ~85% I think the tiny bit of added complexity is worth it here.
2022-07-26shared: move some headers from shared/ to camellia/dzwdz
2022-07-18syscalls: implement execbufdzwdz
i have been planning to implement something like this for a while now. it should be faster when doing consecutive syscalls (to be tested). it will also be helpful in writing the elf loader
2022-07-17amd64: remove dead code, combine shared codedzwdz
2022-07-16amd64: back at the shell!dzwdz
2022-07-16amd64: init can print to the terminal nowdzwdz
2022-07-16amd64: seemingly working syscalls (SYSCALL/SYSRET)dzwdz
2022-07-16amd64: just enough paging support to map initdzwdz
2022-07-16amd64: barely boot into kernel codedzwdz