ladybird/Kernel
Cristian-Bogdan SIRB 717cd5015e Kernel: Allow process with multiple threads to call exec and exit
This allows a process wich has more than 1 thread to call exec, even
from a thread. This kills all the other threads, but it won't wait for
them to finish, just makes sure that they are not in a running/runable
state.

In the case where a thread does exec, the new program PID will be the
thread TID, to keep the PID == TID in the new process.

This introduces a new function inside the Process class,
kill_threads_except_self which is called on exit() too (exit with
multiple threads wasn't properly working either).

Inside the Lock class, there is the need for a new function,
clear_waiters, which removes all the waiters from the
Process::big_lock. This is needed since after a exit/exec, there should
be no other threads waiting for this lock, the threads should be simply
killed. Only queued threads should wait for this lock at this point,
since blocked threads are handled in set_should_die.
2020-02-26 13:06:40 +01:00
..
ACPI ACPI: Don't set Smart Pointers to be nullptr 2020-02-24 11:27:03 +01:00
Arch/i386 Kernel: Change get_sharing_devices_count() in GenericInterruptHandler 2020-02-24 11:27:03 +01:00
Devices Kernel: Change get_pci_address() to pci_address() in PCI::Device class 2020-02-24 11:27:03 +01:00
FileSystem ProcFS: Expose the physical page map of each region in /proc/PID/vm 2020-02-25 23:06:40 +01:00
Heap Kernel: Remove unnecessary allocation metadata from kmalloc() chunks 2020-02-22 15:11:31 +01:00
Interrupts Kernel: Don't use references or pointers to physical addresses 2020-02-24 11:27:03 +01:00
Net AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
PCI Kernel: Don't use references or pointers to physical addresses 2020-02-24 11:27:03 +01:00
TTY AK: Use size_t for CircularQueue and CircularDeque 2020-02-20 13:20:34 +01:00
VM AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
.bochsrc Meta: Make Serenity run on Bochs once again 2019-08-06 21:09:24 +02:00
.gitignore Meta: Removed all gitignore in the source tree only keeping the root one 2019-06-30 10:41:26 +02:00
Assertions.h Kernel: Remove more <LibBareMetal/Output/kstdio.h> includes 2020-02-10 12:07:48 +01:00
build-image-grub.sh Partition Table: Change Script files 2020-02-02 00:20:41 +01:00
build-image-qemu.sh Meta: Fix shellcheck warnings in various scripts 2020-02-10 10:46:25 +01:00
build-root-filesystem.sh Userland+Kernel: Set shutdown/reboot to only be run by the phys group 2020-02-23 22:03:03 +01:00
CMOS.cpp Kernel: Apply changes to use LibBareMetal definitions 2020-02-09 19:38:17 +01:00
CMOS.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
debug-kernel Debugging: Add kernel debugging support 2020-01-13 11:06:42 +01:00
DoubleBuffer.cpp Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
DoubleBuffer.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
FB.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Forward.h Kernel: More header dependency reduction work 2020-02-16 02:15:33 +01:00
grub-ebr.cfg Partition Table: Change Script files 2020-02-02 00:20:41 +01:00
grub-gpt.cfg Partition Table: Change Script files 2020-02-02 00:20:41 +01:00
grub-mbr.cfg Partition Table: Change Script files 2020-02-02 00:20:41 +01:00
init.cpp Kernel: Don't use references or pointers to physical addresses 2020-02-24 11:27:03 +01:00
KBuffer.h Kernel: Commit the entire region up front in KBuffer::copy() 2020-02-23 11:10:52 +01:00
KBufferBuilder.cpp Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
KBufferBuilder.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
KernelInfoPage.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KeyCode.h Kernel: Add key_code_count 2020-01-31 13:13:04 +01:00
KParams.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KParams.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
KResult.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
KSyms.cpp Kernel: Replace "current" with Thread::current and Process::current 2020-02-17 15:04:27 +01:00
KSyms.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
linker.ld Kernel: Move kernel above the 3GB virtual address mark 2020-01-17 22:34:26 +01:00
Lock.cpp Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00
Lock.h Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00
makeall.sh Meta: Fix shellcheck warnings in various scripts 2020-02-10 10:46:25 +01:00
Makefile Build: Update the Kernel makefile to build the latest changes 2020-02-24 11:27:03 +01:00
mkmap.sh Meta: Fix shellcheck warnings in various scripts 2020-02-10 10:46:25 +01:00
Module.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
MousePacket.h Kernel: Add support for vmmouse 2020-02-04 19:11:52 +01:00
Multiboot.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
PerformanceEventBuffer.cpp Kernel+ProfileViewer: Move symbolication to userspace for time profiles 2020-02-22 10:09:54 +01:00
PerformanceEventBuffer.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
Process.cpp Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00
Process.h Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00
ProcessTracer.cpp Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
ProcessTracer.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
Profiling.cpp Kernel: Reset profiling state on exec() (but keep it going) 2020-02-22 10:54:50 +01:00
Profiling.h Kernel: Reset profiling state on exec() (but keep it going) 2020-02-22 10:54:50 +01:00
Random.cpp Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
Random.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
RTC.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
RTC.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
run Meta: Fix shellcheck warnings in various scripts 2020-02-10 10:46:25 +01:00
Scheduler.cpp Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00
Scheduler.h Kernel: Replace "current" with Thread::current and Process::current 2020-02-17 15:04:27 +01:00
SharedBuffer.cpp AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
SharedBuffer.h Kernel: Make Region weakable and use WeakPtr<Region> instead of Region* 2020-02-24 13:32:45 +01:00
sync.sh Meta: Fix shellcheck warnings in various scripts 2020-02-10 10:46:25 +01:00
Syscall.cpp Kernel: Replace "current" with Thread::current and Process::current 2020-02-17 15:04:27 +01:00
Syscall.h Kernel+LibC: Allow sys$mmap() callers to specify address alignment 2020-02-16 12:55:56 +01:00
TestModule.cpp Kernel: Replace "current" with Thread::current and Process::current 2020-02-17 15:04:27 +01:00
Thread.cpp Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00
Thread.h Kernel: Reset FPU state on exec() 2020-02-18 13:44:27 +01:00
TimerQueue.cpp Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
TimerQueue.h Kernel: Include the new PIT class in system components 2020-02-24 11:27:03 +01:00
UnixTypes.h Kernel+LibC: Add SO_REUSEADDR macro 2020-02-20 06:57:01 +01:00
WaitQueue.cpp Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00
WaitQueue.h Kernel: Allow process with multiple threads to call exec and exit 2020-02-26 13:06:40 +01:00