summaryrefslogtreecommitdiffstats
path: root/sys/amd64/ia32/ia32_signal.c
Commit message (Collapse)AuthorAgeFilesLines
* Move some declaration of 32-bit signal structures into filedavidxu2006-10-051-21/+5
| | | | freebsd32-signal.h, implement sigtimedwait and sigwaitinfo system calls.
* Catch up to the system siginfo changes. Use a union for the ia32 layoutpeter2005-12-061-1/+3
| | | | | of siginfo just like the system one. There are now two fields to copy instead of one.
* Catch up with the recent <sys/signal.h> change and make this compile.ru2005-11-041-1/+1
|
* 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, mostdavidxu2005-10-141-14/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes in MD code are trivial, before this change, trapsignal and sendsig use discrete parameters, now they uses member fields of ksiginfo_t structure. For sendsig, this change allows us to pass POSIX realtime signal value to user code. 2. Remove cpu_thread_siginfo, it is no longer needed because we now always generate ksiginfo_t data and feed it to libpthread. 3. Add p_sigqueue to proc structure to hold shared signals which were blocked by all threads in the proc. 4. Add td_sigqueue to thread structure to hold all signals delivered to thread. 5. i386 and amd64 now return POSIX standard si_code, other arches will be fixed. 6. In this sigqueue implementation, pending signal set is kept as before, an extra siginfo list holds additional siginfo_t data for signals. kernel code uses psignal() still behavior as before, it won't be failed even under memory pressure, only exception is when deleting a signal, we should call sigqueue_delete to remove signal from sigqueue but not SIGDELSET. Current there is no kernel code will deliver a signal with additional data, so kernel should be as stable as before, a ksiginfo can carry more information, for example, allow signal to be delivered but throw away siginfo data if memory is not enough. SIGKILL and SIGSTOP have fast path in sigqueue_add, because they can not be caught or masked. The sigqueue() syscall allows user code to queue a signal to target process, if resource is unavailable, EAGAIN will be returned as specification said. Just before thread exits, signal queue memory will be freed by sigqueue_flush. Current, all signals are allowed to be queued, not only realtime signals. Earlier patch reviewed by: jhb, deischen Tested on: i386, amd64
* Implement 32 bit getcontext/setcontext/swapcontext on amd64. I've addedpeter2005-09-271-40/+165
| | | | | stubs for ia64 to keep it compiling. These are used by 32 bit apps such as gdb.
* Remove advertising clause from University of California Regent's license,imp2004-04-051-4/+0
| | | | | | per letter dated July 22, 1999 and email from Peter Wemm. Approved by: core, peter
* Catch up with some proc/procsig locking improvements that were made to thepeter2004-02-211-6/+2
| | | | i386 version and were not merged over.
* Make sigaltstack as per-threaded, because per-process sigaltstack statedavidxu2004-01-031-12/+12
| | | | | | | | | | | | | is useless for threaded programs, multiple threads can not share same stack. The alternative signal stack is private for thread, no lock is needed, the orignal P_ALTSTACK is now moved into td_pflags and renamed to TDP_ALTSTACK. For single thread or Linux clone() based threaded program, there is no semantic changed, because those programs only have one kernel thread in every process. Reviewed by: deischen, dfr
* Catch up with the procsig locking changes elsewhere. We were doingpeter2003-12-031-0/+6
| | | | | | things like copyin/out with psp->ps_mtx held. That was not good. Approved by: re (scottl)
* Move a MD 32 bit binary support routine into the MD areas. exec_setregspeter2003-11-081-0/+41
| | | | | | | is highly MD in an emulation environment since it operates on the host environment. Although the setregs functions are really for exec support rather than signals, they deal with the same sorts of context and include files. So I put it there rather than create yet another file.
* The great s/npx/fpu/gipeter2003-11-081-5/+5
|
* Switch to using the emulator in the common compat area.peter2003-08-231-13/+13
| | | | Still work-in-progress.
* Use __FBSDID().obrien2003-07-251-2/+3
| | | | Brought to you by: a boring talk at Ottawa Linux Symposium
* Deal with the user VM space expanding. 32 bit applications do not likepeter2003-05-231-3/+3
| | | | | | | | | having their stack at the 512GB mark. Give 4GB of user VM space for 32 bit apps. Note that this is significantly more than on i386 which gives only about 2.9GB of user VM to a process (1GB for kernel, plus page table pages which eat user VM space). Approved by: re (blanket)
* Add BASIC i386 binary support for the amd64 kernel. This is largelypeter2003-05-141-0/+559
stolen from the ia64/ia32 code (indeed there was a repocopy), but I've redone the MD parts and added and fixed a few essential syscalls. It is sufficient to run i386 binaries like /bin/ls, /usr/bin/id (dynamic) and p4. The ia64 code has not implemented signal delivery, so I had to do that. Before you say it, yes, this does need to go in a common place. But we're in a freeze at the moment and I didn't want to risk breaking ia64. I will sort this out after the freeze so that the common code is in a common place. On the AMD64 side, this required adding segment selector context switch support and some other support infrastructure. The %fs/%gs etc code is hairy because loading %gs will clobber the kernel's current MSR_GSBASE setting. The segment selectors are not used by the kernel, so they're only changed at context switch time or when changing modes. This still needs to be optimized. Approved by: re (amd64/* blanket)
OpenPOWER on IntegriCloud