| Age | Commit message (Collapse) | Author |
|
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>
|
|
This patch converts verify_area to access_ok in arch/i386, fs/, kernel/ and a
few other bits that didn't fit in the other patches or that I actually was
able to test on my hardware - this is by far the best tested of all the
patches.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
This splits poll_table into one structure used by f_op->poll and one
structure used by the implemenation of sys_poll/sys_select: poll_table
contains just the callback function pointer. struct poll_wrapper
additionally contains err and table, i.e. the members used by the poll
implementation.
Changes:
- split poll_table into 2 structures
- reorder the declarations in <linux/poll.h> accordingly
- uninline poll_initwait().
|
|
- A more uniform poll queueing interface with tips from Manfred
- The f_op->poll() is done outside the irqlock to maintain compatibility
with existing drivers that assume to be called with irq enabled
- Moved event mask setting inside ep_modify() with tips from John
- Fixed locking to fit the new "poll() outside the lock" approach
- Bufferd userspace event delivery to reduce irq_lock/irq_unlock switching
rate and to reduce the number of __copy_to_user()
- Comments added
|
|
Clean up poll queue handling, avoid doing any wait-queue operations
when we only want to get the current state.
|
|
- Some constant adjusted
- Comments added
- Better hash initialization
- Correct timeout setup
- Added __KERNEL__ bypass to avoid userspace inclusion problems
- Cleaned up locking
- Function poll_init_wait() now calls poll_init_wait_ex()
- Event return fix ( Jay Vosburgh )
- Use <linux/hash.h> for the hash
|
|
- EP_CTL_MOD drops an event if conditions events are met
- The source file eventpoll.c moved from drivers/char to fs
- Fixed a weirdness with tty's
Missing: system calls for arch != i386 ...
|
|
- Anton Altaparmakov: NTFS error checking
- Johannes Erdfelt: USB updates
- OGAWA Hirofumi: FAT update
- Alan Cox: driver + s390 update merge
- Richard Henderson: fix alpha sigsuspend error return value
- Marcelo Tosatti: per-zone VM shortage
- Daniel Phillips: generic use-once optimization instead of drop-behind
- Bjorn Wesen: Cris architecture update
- Anton Altaparmakov: support for Windows Dynamic Disks
- James Washer: LDT loading SMP bug fix
|
|
|