linux-kernel-test/include
David Woodhouse 9f72949f67 [PATCH] Add pselect/ppoll system call implementation
The following implementation of ppoll() and pselect() system calls
depends on the architecture providing a TIF_RESTORE_SIGMASK flag in the
thread_info.

These system calls have to change the signal mask during their
operation, and signal handlers must be invoked using the new, temporary
signal mask. The old signal mask must be restored either upon successful
exit from the system call, or upon returning from the invoked signal
handler if the system call is interrupted. We can't simply restore the
original signal mask and return to userspace, since the restored signal
mask may actually block the signal which interrupted the system call.

The TIF_RESTORE_SIGMASK flag deals with this by causing the syscall exit
path to trap into do_signal() just as TIF_SIGPENDING does, and by
causing do_signal() to use the saved signal mask instead of the current
signal mask when setting up the stack frame for the signal handler -- or
by causing do_signal() to simply restore the saved signal mask in the
case where there is no handler to be invoked.

The first patch implements the sys_pselect() and sys_ppoll() system
calls, which are present only if TIF_RESTORE_SIGMASK is defined. That
#ifdef should go away in time when all architectures have implemented
it. The second patch implements TIF_RESTORE_SIGMASK for the PowerPC
kernel (in the -mm tree), and the third patch then removes the
arch-specific implementations of sys_rt_sigsuspend() and replaces them
with generic versions using the same trick.

The fourth and fifth patches, provided by David Howells, implement
TIF_RESTORE_SIGMASK for FR-V and i386 respectively, and the sixth patch
adds the syscalls to the i386 syscall table.

This patch:

Add the pselect() and ppoll() system calls, providing core routines usable by
the original select() and poll() system calls and also the new calls (with
their semantics w.r.t timeouts).

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-18 19:20:30 -08:00
..
acpi
asm-alpha [PATCH] death of get_thread_info/put_thread_info 2006-01-12 09:08:59 -08:00
asm-arm Merge master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-upstream 2006-01-18 22:56:29 +00:00
asm-arm26 [PATCH] arm26: add L1_CACHE_SHIFT 2006-01-16 23:15:26 -08:00
asm-cris [PATCH] death of get_thread_info/put_thread_info 2006-01-12 09:08:59 -08:00
asm-frv [PATCH] Handle TIF_RESTORE_SIGMASK for FRV 2006-01-18 19:20:29 -08:00
asm-generic [PATCH] Use atomic64_set for 64-bit case of atomic_long_set 2006-01-15 10:17:07 -08:00
asm-h8300 [PATCH] death of get_thread_info/put_thread_info 2006-01-12 09:08:59 -08:00
asm-i386 [PATCH] Handle TIF_RESTORE_SIGMASK for i386 2006-01-18 19:20:29 -08:00
asm-ia64 Pull perfmon-montecito into release branch 2006-01-16 20:02:24 -08:00
asm-m32r [PATCH] death of get_thread_info/put_thread_info 2006-01-12 09:08:59 -08:00
asm-m68k [PATCH] m68k: kill mach_floppy_setup, convert to proper __setup() in drivers 2006-01-12 09:09:05 -08:00
asm-m68knommu [PATCH] m68k: kill mach_floppy_setup, convert to proper __setup() in drivers 2006-01-12 09:09:05 -08:00
asm-mips [PATCH] death of get_thread_info/put_thread_info 2006-01-12 09:08:59 -08:00
asm-parisc [PATCH] death of get_thread_info/put_thread_info 2006-01-12 09:08:59 -08:00
asm-powerpc [PATCH] TIF_RESTORE_SIGMASK support for arch/powerpc 2006-01-18 19:20:30 -08:00
asm-ppc [PATCH] ppc: Remove powermac support from ARCH=ppc 2006-01-15 17:30:44 +11:00
asm-s390 [PATCH] s390: email-address change 2006-01-14 18:27:10 -08:00
asm-sh [PATCH] sh: Simple timer framework 2006-01-16 23:15:28 -08:00
asm-sh64 [PATCH] death of get_thread_info/put_thread_info 2006-01-12 09:08:59 -08:00
asm-sparc [PATCH] death of get_thread_info/put_thread_info 2006-01-12 09:08:59 -08:00
asm-sparc64 [SPARC64]: Serial Console for E250 Patch 2006-01-18 14:54:31 -08:00
asm-um [PATCH] uml: use generic sys_rt_sigsuspend 2006-01-18 19:20:30 -08:00
asm-v850 Fix "stuct", "strut", "struc" typos 2006-01-15 02:12:54 +01:00
asm-x86_64 [PATCH] vfs: *at functions: x86_64 2006-01-18 19:20:29 -08:00
asm-xtensa [PATCH] death of get_thread_info/put_thread_info 2006-01-12 09:08:59 -08:00
keys [PATCH] Keys: Remove key duplication 2006-01-06 08:33:29 -08:00
linux [PATCH] Add pselect/ppoll system call implementation 2006-01-18 19:20:30 -08:00
math-emu
media V4L/DVB (3388): tuner_params->tda988x is currently unused, so disable 2006-01-15 21:28:17 -02:00
mtd
net [PATCH] hostap: don't #include C files in hostap_main.c 2006-01-16 16:51:54 -05:00
pcmcia [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback 2006-01-06 00:03:24 +01:00
rdma IB: Add node_guid to struct ib_device 2006-01-10 07:39:34 -08:00
rxrpc
scsi [PATCH] scsi_transport_spi build fix 2006-01-18 19:20:16 -08:00
sound [PATCH] DocBook: fix kernel-doc comments 2006-01-10 08:01:53 -08:00
video [PATCH] include/video/newport.h: "extern inline" -> "static inline" 2006-01-10 08:01:50 -08:00