mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
eventfd: revised interface and cleanups
Change the eventfd interface to de-couple the eventfd memory context, from the file pointer instance. Without such change, there is no clean way to racely free handle the POLLHUP event sent when the last instance of the file* goes away. Also, now the internal eventfd APIs are using the eventfd context instead of the file*. This patch is required by KVM's IRQfd code, which is still under development. Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Cc: Gregory Haskins <ghaskins@novell.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Benjamin LaHaise <bcrl@kvack.org> Cc: Avi Kivity <avi@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f7c2df9b55
commit
133890103b
6 changed files with 149 additions and 42 deletions
|
@ -121,9 +121,9 @@ struct kiocb {
|
|||
|
||||
/*
|
||||
* If the aio_resfd field of the userspace iocb is not zero,
|
||||
* this is the underlying file* to deliver event to.
|
||||
* this is the underlying eventfd context to deliver events to.
|
||||
*/
|
||||
struct file *ki_eventfd;
|
||||
struct eventfd_ctx *ki_eventfd;
|
||||
};
|
||||
|
||||
#define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue