if (p->p_numthreads > 1) and not a flag because action is only necessary
if there are other threads. The rest of the system has no need to
identify thr threaded processes.
- In kern_thread.c use thr_exit1() instead of thread_exit() if P_THREADED
is not set.
- umtx_lock() is defined as an inline in umtx.h. It tries to do an
uncontested acquire of a lock which falls back to the _umtx_lock()
system-call if that fails.
- umtx_unlock() is also an inline which falls back to _umtx_unlock() if the
uncontested unlock fails.
- Locks are keyed off of the thr_id_t of the currently running thread which
is currently just the pointer to the 'struct thread' in kernel.
- _umtx_lock() uses the proc pointer to synchronize access to blocked thread
queues which are stored in the first blocked thread.
- sys/thr.h contains the user space visible api that is intended only for
use in threading library packages.
- kern/kern_thr.c contains thr system calls and other thr specific code.
a pointer that is in user space. It will be used as the basic primitive
for a kernel supported user space lock implementation.
- Implement this function in x86's support.s
- Provide stubs that return -1 in all other architectures. Implementations
will follow along shortly.
Reviewed by: jake
kern_sigtimedwait() which is capable of supporting all of their semantics.
- These should be POSIX compliant but more careful review is needed before
we announce this.
Instead, use the generic vaccess() operation to determine whether
an operation is permitted. This avoids embedding knowledge on
vnode permission bits such as VAPPEND in the NFS client.
PR: kern/46515
vaccess() patch submitted by: "Peter Edwards" <pmedwards@eircom.net>
Approved by: tjr, roberto (mentor)
when they were delivered. In signotify() check to see if we have
unblocked any of those signals and post them to the thread.
- Use td_sigmask instead of p_sigmask in all cases.
- In sigpending return both signals pending on the thread and proc.
- Define a function, sigtd(), that finds the appropriate thread to deliver
the signal to if psignal() has been called instead of tdsignal().
- Define a function, tdsignal(), that delivers a signal to a specific thread
or if that thread has the signal blocked it may deliver it to the process
where it will wait for a thread to unblock it.
- Since we are delivering signals to a specific thread we do not need to
abort the sleep of all threads.
- Rename the old tdsignal() to tdsigwakeup().
- Save and restore the old signal mask to and from the thread.
a follow on commit to kern_sig.c
- signotify() now operates on a thread since unmasked pending signals are
stored in the thread.
- PS_NEEDSIGCHK moves to TDF_NEEDSIGCHK.
- Change all consumers to pass in a thread.
Right now this does not cause any functional changes but it will be important
later when signals can be delivered to specific threads.
critical and should not be killed when pageout is looking for more
memory pages in all the wrong places.
Reviewed by: arch@
Sponsored by: St. Bernard Software
be overridden by setting hw.physmem.
- Fix a vm_map_find arg, we don't want to find space.
- Add tracing and statistics for off colored pages.
- Detect "stupid" pmap_kenters (same virtual and physical as existing
mapping), and do nothing in that case.