freebsd-dev/sys/compat/linux
David Xu 9104847f21 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most
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
2005-10-14 12:43:47 +00:00
..
linux_file.c Add support for O_NOFOLLOW and O_DIRECT to Linux fcntl() F_GETFL/F_SETFL. 2005-04-13 04:31:43 +00:00
linux_getcwd.c Add Giant around linux_getcwd_common() in linux_getcwd(). 2005-07-09 12:34:49 +00:00
linux_ioctl.c Fix kernel build. 2005-08-28 13:11:08 +00:00
linux_ioctl.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
linux_ipc.c Move MODULE_DEPEND() statements for SYSVIPC dependencies to linux_ipc.c 2005-07-29 19:40:39 +00:00
linux_ipc.h Changes to MI Linux emulation code necessary to run 32-bit Linux binaries 2004-08-16 07:28:16 +00:00
linux_mib.c Match the LINUX32's style with existing style 2005-01-14 04:44:56 +00:00
linux_mib.h Add a cleanup function to destroy the osname_lock and call it on module 2003-03-26 18:29:44 +00:00
linux_misc.c 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most 2005-10-14 12:43:47 +00:00
linux_signal.c Unbreak the kernel build. Pointy hat to: sobomax. 2005-02-13 19:50:57 +00:00
linux_signal.h
linux_socket.c Back out alpha/alpha/trap.c:1.124, osf1_ioctl.c:1.14, osf1_misc.c:1.57, 2005-09-28 07:03:03 +00:00
linux_socket.h Fix typo in the BSD copyright: s/withough/without/ 2002-06-02 20:05:59 +00:00
linux_stats.c Actually only protect mount-point if security.jail.enforce_statfs is set to 2. 2005-06-23 22:13:29 +00:00
linux_sysctl.c Match the LINUX32's style with existing style 2005-01-14 04:44:56 +00:00
linux_sysproto.h Handle unimplemented syscall by instantly returning ENOSYS instead of sending 2005-03-07 00:18:06 +00:00
linux_uid16.c Match the LINUX32's style with existing style 2005-01-14 04:44:56 +00:00
linux_util.c Remove linux_emul_find() and the CHECKALT*() macros as they are no longer 2005-03-01 17:57:45 +00:00
linux_util.h Remove linux_emul_find() and the CHECKALT*() macros as they are no longer 2005-03-01 17:57:45 +00:00