#
e8161590 |
| 26-Nov-2021 |
visa <visa@openbsd.org> |
Mark exit1() and sigexit() as non-returning
The late 1990s reasons for avoiding __dead with exit1() should not apply with the current compilers.
This fixes compiler warnings about uninitialized var
Mark exit1() and sigexit() as non-returning
The late 1990s reasons for avoiding __dead with exit1() should not apply with the current compilers.
This fixes compiler warnings about uninitialized variables in trap.c on mips64.
Discussed with guenther@ and miod@
show more ...
|
#
b275c9b3 |
| 24-Nov-2021 |
visa <visa@openbsd.org> |
Remove unneeded <sys/stdarg.h>.
OK guenther@
|
#
3d8a8d53 |
| 21-Feb-2020 |
claudio <claudio@openbsd.org> |
Remove sigacts structure sharing. The only process that used sharing was proc0 which is used for kthreads and idle threads. proc0 and all those other kernel threads don't handle signals so there is n
Remove sigacts structure sharing. The only process that used sharing was proc0 which is used for kthreads and idle threads. proc0 and all those other kernel threads don't handle signals so there is no benefit in sharing. Simplifies the code a fair bit since the refcnt is gone. OK kettenis@
show more ...
|
#
381e34d2 |
| 11-Dec-2019 |
guenther <guenther@openbsd.org> |
Replace p_xstat with ps_xexit and ps_xsig Convert those to a consolidated status when needed in wait4(), kevent(), and sysctl() Pass exit code and signal separately to exit1() (This also serves as p
Replace p_xstat with ps_xexit and ps_xsig Convert those to a consolidated status when needed in wait4(), kevent(), and sysctl() Pass exit code and signal separately to exit1() (This also serves as prep for adding waitid(2))
ok mpi@
show more ...
|
#
0fd5329e |
| 05-Jul-2018 |
visa <visa@openbsd.org> |
Grab the KERNEL_LOCK() in kthread_create(9) to enable unlocked code paths create kernel threads. This will be utilized by sosplice() for the taskq allocation.
OK mpi@
|
#
79a514fc |
| 12-Feb-2017 |
guenther <guenther@openbsd.org> |
Split up fork1(): - FORK_THREAD handling is a totally separate function, thread_fork(), that is only used by sys___tfork() and which loses the flags, func, arg, and newprocp parameters and gai
Split up fork1(): - FORK_THREAD handling is a totally separate function, thread_fork(), that is only used by sys___tfork() and which loses the flags, func, arg, and newprocp parameters and gains tcb parameter to guarantee the new thread's TCB is set before the creating thread returns - fork1() loses its stack and tidptr parameters Common bits factor out: - struct proc allocation and initialization moves to thread_new() - maxthread handling moves to fork_check_maxthread() - setting the new thread running moves to fork_thread_start() The MD cpu_fork() function swaps its unused stacksize parameter for a tcb parameter.
luna88k testing by aoyama@, alpha testing by dlg@ ok mpi@
show more ...
|
#
8fda72b7 |
| 21-Jan-2017 |
guenther <guenther@openbsd.org> |
p_comm is the process's command and isn't per thread, so move it from struct proc to struct process.
ok deraadt@ kettenis@
|
#
3b7181b7 |
| 07-Nov-2016 |
guenther <guenther@openbsd.org> |
Split PID from TID, giving processes a PID unrelated to the TID of their initial thread
ok jsing@ kettenis@
|
#
21dab745 |
| 14-Mar-2015 |
jsg <jsg@openbsd.org> |
Remove some includes include-what-you-use claims don't have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
#
5ff140d2 |
| 03-Nov-2014 |
deraadt <deraadt@openbsd.org> |
pass size argument to free() ok doug tedu
|
#
9e8577e7 |
| 12-Jul-2014 |
tedu <tedu@openbsd.org> |
add a size argument to free. will be used soon, but for now default to 0. after discussions with beck deraadt kettenis.
|
#
ed557a36 |
| 04-May-2014 |
guenther <guenther@openbsd.org> |
Add PS_SYSTEM, the process-level mirror of the thread-level P_SYSTEM, and FORK_SYSTEM as a flag to set them. This eliminates needing to peek into other processes threads in various places. Inspired
Add PS_SYSTEM, the process-level mirror of the thread-level P_SYSTEM, and FORK_SYSTEM as a flag to set them. This eliminates needing to peek into other processes threads in various places. Inspired by NetBSD
ok miod@ matthew@
show more ...
|
#
34b8a7e2 |
| 12-Feb-2014 |
guenther <guenther@openbsd.org> |
Eliminate the exit sig handling, which was only invokable via the Linux-compat clone() syscall when *not* using CLONE_THREAD. pirofti@ confirms Opera runs in compat without this, so out it goes; one
Eliminate the exit sig handling, which was only invokable via the Linux-compat clone() syscall when *not* using CLONE_THREAD. pirofti@ confirms Opera runs in compat without this, so out it goes; one less hair to choke on in kern_exit.c
ok tedu@ pirofti@
show more ...
|
#
2d257949 |
| 18-Nov-2013 |
deraadt <deraadt@openbsd.org> |
simplify kthread_create(). no more stdarg ok matthew guenther mikeb
|
#
2f360485 |
| 28-Mar-2013 |
deraadt <deraadt@openbsd.org> |
do not include machine/cpu.h from a .c file; it is the responsibility of .h files to pull it in, if needed ok tedu
|
#
e8200582 |
| 09-Nov-2011 |
guenther <guenther@openbsd.org> |
Change fork1() and kthread_create() to match the rest of the tree and use curp vs p instead of p1 vs p2. Add curpr and pr variables for the respective struct processes. Make sigactsshare() return t
Change fork1() and kthread_create() to match the rest of the tree and use curp vs p instead of p1 vs p2. Add curpr and pr variables for the respective struct processes. Make sigactsshare() return the shared sigacts intead of taking the struct proc to update.
ok deraadt@
show more ...
|
#
d874cce4 |
| 26-Jun-2008 |
ray <ray@openbsd.org> |
First pass at removing clauses 3 and 4 from NetBSD licenses.
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code t
First pass at removing clauses 3 and 4 from NetBSD licenses.
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors.
OK deraadt@
show more ...
|
#
48a7f492 |
| 02-May-2008 |
blambert <blambert@openbsd.org> |
Pass FORK_SHAREFILES flag in kthread_create; avoids allocating a filedesc struct and associated fdcopy operation on kernel thread creation. Instead, kernel threads share and bump reference count on p
Pass FORK_SHAREFILES flag in kthread_create; avoids allocating a filedesc struct and associated fdcopy operation on kernel thread creation. Instead, kernel threads share and bump reference count on proc0's filedesc.
ok thib@, "definitely makes sense" art@
show more ...
|
#
28a8f404 |
| 07-Sep-2007 |
art <art@openbsd.org> |
Use M_ZERO in a few more places to shave bytes from the kernel.
eyeballed and ok dlg@
|
#
29514732 |
| 15-Mar-2007 |
art <art@openbsd.org> |
Since p_flag is often manipulated in interrupts and without biglock it's a good idea to use atomic.h operations on it. This mechanic change updates all bit operations on p_flag to atomic_{set,clear}b
Since p_flag is often manipulated in interrupts and without biglock it's a good idea to use atomic.h operations on it. This mechanic change updates all bit operations on p_flag to atomic_{set,clear}bits_int.
Only exception is that P_OWEUPC is set by MI code before calling need_proftick and it's automatically cleared by ADDUPC. There's no reason for MD handling of that flag since everyone handles it the same way.
kettenis@ ok
show more ...
|
#
46718002 |
| 29-Nov-2006 |
miod <miod@openbsd.org> |
Kernel stack can be swapped. This means that stuff that's on the stack should never be referenced outside the context of the process to which this stack belongs unless we do the PHOLD/PRELE dance. Lo
Kernel stack can be swapped. This means that stuff that's on the stack should never be referenced outside the context of the process to which this stack belongs unless we do the PHOLD/PRELE dance. Loads of code doesn't follow the rules here. Instead of trying to track down all offenders and fix this hairy situation, it makes much more sense to not swap kernel stacks.
From art@, tested by many some time ago.
show more ...
|
#
802bb6ac |
| 03-Dec-2005 |
tedu <tedu@openbsd.org> |
kernel support for threaded processes (rthreads). uses rfork(RFTHREAD) to create threads, which are presently processes that are a little more tightly bound together. several new syscalls added to f
kernel support for threaded processes (rthreads). uses rfork(RFTHREAD) to create threads, which are presently processes that are a little more tightly bound together. several new syscalls added to facilitate a userland thread library. all conditional on RTHREADS, currently disabled. ok deraadt
show more ...
|
#
f229b07c |
| 08-Dec-2004 |
miod <miod@openbsd.org> |
Have kthread_create_deferred() act immediately once kthread_run_deferred_queue() has been invoked; forgotten part of the ``create init earlier'' changes. From NetBSD as well. ok deraadt@ dlg@
|
#
240d2236 |
| 23-Nov-2004 |
miod <miod@openbsd.org> |
Create the init process earlier, before the root filesystem is mounted, and have it stall on a semaphore. This allows all kthread creations which could have been requested during autoconf to be proce
Create the init process earlier, before the root filesystem is mounted, and have it stall on a semaphore. This allows all kthread creations which could have been requested during autoconf to be processed before root is mounted as well.
This causes umass devices attached to any usb with flags 1 (such as on macppc) to configure properly instead of panicing the kernel at mountroot time.
From NetBSD; tested by various.
show more ...
|
#
255ad9aa |
| 04-May-2004 |
grange <grange@openbsd.org> |
Remove useless ``elm'' argument from the SIMPLEQ_REMOVE_HEAD macro. This matches our SLIST behaviour and NetBSD's SIMPLEQ as well.
ok millert krw deraadt
|