9104847f21
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 |
||
---|---|---|
.. | ||
imgact_svr4.c | ||
Makefile | ||
svr4_acl.h | ||
svr4_dirent.h | ||
svr4_errno.h | ||
svr4_exec.h | ||
svr4_fcntl.c | ||
svr4_fcntl.h | ||
svr4_filio.c | ||
svr4_filio.h | ||
svr4_fuser.h | ||
svr4_hrt.h | ||
svr4_ioctl.c | ||
svr4_ioctl.h | ||
svr4_ipc.c | ||
svr4_ipc.h | ||
svr4_misc.c | ||
svr4_mman.h | ||
svr4_proto.h | ||
svr4_resource.c | ||
svr4_resource.h | ||
svr4_siginfo.h | ||
svr4_signal.c | ||
svr4_signal.h | ||
svr4_socket.c | ||
svr4_socket.h | ||
svr4_sockio.c | ||
svr4_sockio.h | ||
svr4_sockmod.h | ||
svr4_stat.c | ||
svr4_stat.h | ||
svr4_statvfs.h | ||
svr4_stream.c | ||
svr4_stropts.h | ||
svr4_syscall.h | ||
svr4_syscallnames.c | ||
svr4_sysconfig.h | ||
svr4_sysent.c | ||
svr4_systeminfo.h | ||
svr4_sysvec.c | ||
svr4_termios.c | ||
svr4_termios.h | ||
svr4_time.h | ||
svr4_timod.h | ||
svr4_ttold.c | ||
svr4_ttold.h | ||
svr4_types.h | ||
svr4_ucontext.h | ||
svr4_ulimit.h | ||
svr4_ustat.h | ||
svr4_util.h | ||
svr4_utsname.h | ||
svr4_wait.h | ||
svr4.h | ||
syscalls.conf | ||
syscalls.master |