aio-posix: move pollfds to thread-local storage
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 20 Feb 2015 16:26:50 +0000 (17:26 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 28 Apr 2015 13:36:08 +0000 (15:36 +0200)
commite98ab097092e54999f046e9efa1ca1dd52f0c9e5
treebcb3f66a1c083c9c250e396be7b859d6d5b1507d
parentde50a20a4cc368d241d67c600f8c0f667186a8b5
aio-posix: move pollfds to thread-local storage

By using thread-local storage, aio_poll can stop using global data during
g_poll_ns.  This will make it possible to drop callbacks from rfifolock.

[Moved npfd = 0 assignment to end of walking_handlers region as
suggested by Paolo.  This resolves the assert(npfd == 0) assertion
failure in pollfds_cleanup().
--Stefan]

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1424449612-18215-2-git-send-email-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
aio-posix.c
async.c
include/block/aio.h