summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_context.c
Commit message (Collapse)AuthorAgeFilesLines
* Add an argument to get_mcontext() which specified whether thedeischen2003-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | syscall return values should be cleared. The system calls getcontext() and swapcontext() want to return 0 on success but these contexts can be switched to at a later time so the return values need to be cleared in the saved register sets. Other callers of get_mcontext() would normally want the context without clearing the return values. Remove the i386-specific context saving from the KSE code. get_mcontext() is not i386-specific any more. Fix a bad pointer in the alpha get_mcontext() code. The context was being bcopy()'d from &td->tf_frame, but tf_frame is itself a pointer, so the thread was being copied instead. Spotted by jake. Glanced at by: jake Reviewed by: bde (months ago)
* Protect td_sigmask with the proc lock.jhb2003-04-171-1/+5
|
* - Fix UC_COPY_SIZE. Adding up the size of structure fields doesn't takejake2003-04-011-4/+3
| | | | | | alignment into account. - Return EJUSTRETURN from set_context on success to avoid clobbering the first 2 out registers with td_retval on sparc64.
* - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread withjeff2003-03-311-4/+4
| | | | | | | 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.
* Add getcontext, setcontext, and swapcontext as system calls.deischen2002-11-161-0/+134
Previously these were libc functions but were requested to be made into system calls for atomicity and to coalesce what might be two entrances into the kernel (signal mask setting and floating point trap) into one. A few style nits and comments from bde are also included. Tested on alpha by: gallatin
OpenPOWER on IntegriCloud