android_kernel_xiaomi_sm7250/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
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
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
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
asm-m68k
asm-m68knommu
asm-mips
asm-parisc
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
asm-sparc
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
keys
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
rdma
rxrpc
scsi [PATCH] scsi_transport_spi build fix 2006-01-18 19:20:16 -08:00
sound
video