summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_context.c
Commit message (Collapse)AuthorAgeFilesLines
* Move prototypes for kern_sigtimedwait() and kern_sigprocmask() tojhb2010-06-301-0/+1
| | | | <sys/syscallsubr.h> where all other kern_<syscall> prototypes live.
* In r197963, a race with thread being selected for signal deliverykib2009-10-271-8/+4
| | | | | | | | | | | | | while in kernel mode, and later changing signal mask to block the signal, was fixed for sigprocmask(2) and ptread_exit(3). The same race exists for sigreturn(2), setcontext(2) and swapcontext(2) syscalls. Use kern_sigprocmask() instead of direct manipulation of td_sigmask to reschedule newly blocked signals, closing the race. Reviewed by: davidxu Tested by: pho MFC after: 1 month
* Further system call comment cleanup:rwatson2007-03-051-3/+3
| | | | | | | | | | - Remove also "MP SAFE" after prior "MPSAFE" pass. (suggested by bde) - Remove extra blank lines in some cases. - Add extra blank lines in some cases. - Remove no-op comments consisting solely of the function name, the word "syscall", or the system call name. - Add punctuation. - Re-wrap some comments.
* Remove 'MPSAFE' annotations from the comments above most system calls: allrwatson2007-03-041-6/+0
| | | | | | | | system calls now enter without Giant held, and then in some cases, acquire Giant explicitly. Remove a number of other MPSAFE annotations in the credential code and tweak one or two other adjacent comments.
* Change the clear_ret argument of get_mcontext() to be a flags argument.marcel2003-11-091-2/+2
| | | | | | | | | | Since all callers either passed 0 or 1 for clear_ret, define bit 0 in the flags for use as clear_ret. Reserve bits 1, 2 and 3 for use by MI code for possible (but unlikely) future use. The remaining bits are for use by MD code. This change is triggered by a need on ia64 to have another knob for get_mcontext().
* Use __FBSDID().obrien2003-06-111-4/+3
|
* 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