| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
paths create kernel threads. This will be utilized by sosplice()
for the taskq allocation.
OK mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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@
|
|
|
|
|
|
| |
struct proc to struct process.
ok deraadt@ kettenis@
|
|
|
|
|
|
| |
initial thread
ok jsing@ kettenis@
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
| |
ok doug tedu
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
ok matthew guenther mikeb
|
|
|
|
|
| |
.h files to pull it in, if needed
ok tedu
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
eyeballed and ok dlg@
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
has been invoked; forgotten part of the ``create init earlier'' changes.
From NetBSD as well.
ok deraadt@ dlg@
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This matches our SLIST behaviour and NetBSD's SIMPLEQ as well.
ok millert krw deraadt
|
|
|
|
|
|
|
| |
to built-ins, so eventually we will have one version of these files.
Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h
and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes.
okay millert@, drahn@, miod@.
|
| |
|
| |
|
| |
|
|
|
|
| |
the ANSI way.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
instead of doing fork1, cpu_set_kpc. This lets us retire cpu_set_kpc and
avoid a multiprocessor race.
This commit breaks vax because it doesn't look like any other arch, someone
working on vax might want to look at this and try to adapt the code to be
more like the rest of the world.
Idea and uvm parts from NetBSD.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
on NetBSD's code, as well as some faked Posix RT extensions by me. This makes
at least simple linuxthreads tests work.
|
| |
|
|
|
|
| |
Pointed out by miod@
|
|
|
|
|
|
| |
show them with -k. Do not try to show RSS based values for them as they
mess up column alignment. vmstat -f now shows kernel threads separately
from rforks too.
|
| |
|
| |
|
|
|
|
|
| |
argument. Let sys_rfork build the arguments to fork1() and do the
sanity checks itself.
|
|
|
|
|
|
| |
to, at the bottom or the top, depending on your architecture's stack growth
direction. This is in preparation for Linux' clone(2) emulation.
port maintainers, please check that I did the work right.
|
| |
|
| |
|
|
|