summaryrefslogtreecommitdiff
path: root/include/linux/poll.h
AgeCommit message (Collapse)Author
2006-01-18[PATCH] Add pselect/ppoll system call implementationDavid Woodhouse
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>
2005-03-13[PATCH] verify_area cleanup : i386 and misc.Jesper Juhl
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>
2004-08-26[PATCH] copy_to_user checking in select.cAndrew Morton
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2003-04-09Add user pointer annotations to fs/select.cLinus Torvalds
2002-11-16[PATCH] additional cleanup for f_op->pollManfred Spraul
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().
2002-11-14[PATCH] epoll bits 0.46 ...Davide Libenzi
- 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
2002-11-10[PATCH] remove code duplication from fs/eventpoll.cDavide Libenzi
Clean up poll queue handling, avoid doing any wait-queue operations when we only want to get the current state.
2002-11-06[PATCH] epoll bits 0.34Davide Libenzi
- 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
2002-11-02[PATCH] epoll update r3Davide Libenzi
- 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 ...
2002-02-04v2.4.7 -> v2.4.7.1Linus Torvalds
- 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
2002-02-04Import changesetLinus Torvalds