summaryrefslogtreecommitdiff
path: root/compatfd.c
AgeCommit message (Collapse)AuthorFilesLines
2010-02-17Move qemu_eventfd to osdep.cPaolo Bonzini1-26/+0
Upstream has no compatfd.[ch], so move the code to the most similar place. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2009-12-15compatfd: trivial compile fixChris Wright1-1/+1
Fix build when !CONFIG_EVENTFD CC compatfd.o compatfd.c: In function ‘qemu_eventfd’: compatfd.c:137: error: ‘ret’ undeclared (first use in this function) compatfd.c:137: error: (Each undeclared identifier is reported only once compatfd.c:137: error: for each function it appears in.) make: *** [compatfd.o] Error 1 Signed-off-by: Chris Wright <chrisw@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2009-12-07Merge commit '40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4' into upstream-mergeAvi Kivity1-2/+14
* commit '40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4': Don't leak file descriptors qemu-img: There is more than one host device driver qcow2: Fix some more qemu_malloc fallout qcow2: Store exact backing format length virtio-blk: Implement rerror option ide: Implement rerror option Conflicts: posix-aio-compat.c Extended qemu_set_cloexec() to compatfd.c. Signed-off-by: Avi Kivity <avi@redhat.com>
2009-09-18One CONFIG_EVENTFD should be enoughJuan Quintela1-1/+1
(there was a missmerge with need_offset) Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2009-09-18Use common style for signalfdJuan Quintela1-1/+1
s/CONFIG_signalfd/CONFIG_signalfd/ Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2008-11-02Dup the qemu_eventfd() returnMark McLoughlin1-1/+5
qemu_eventfd() returns two file descriptors, both of which must be closed when pipe() is used in the absence of eventfd(). Duplicate the eventfd() file descriptor so that closing both descriptors will work in that case. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2008-10-08Fix IO performance regression in sparcaliguori1-127/+0
Replace signalfd with signal handler/pipe. There is no way to interrupt the CPU execution loop when a file descriptor becomes readable. This results in a large performance regression in sparc emulation during bootup. This patch switches us to signal handler/pipe which was originally suggested by Ian Jackson. The signal handler lets us interrupt the CPU emulation loop while the write to a pipe lets us avoid the select/signal race condition. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5451 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-27Make compatfd fallback more robustaliguori1-5/+4
Be more friendly when signalfd() fails, and also add configure checks to detect that syscall(SYS_signalfd) actually works. malc pointed out that some installs do not have /usr/include/linux headers that are in sync with the glibc headers so why SYS_signalfd is defined, it's #defined to _NR_signalfd which is not defined in the /usr/include/linux header. While this is a distro bug, it doesn't hurt to do a more thorough job in detection. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5334 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-27Fix whitespace damage in compatfdaliguori1-28/+28
Spotted by malc. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5333 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-10Add missing files from previous commit.aliguori1-0/+128
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5188 c046a42c-6fe2-441c-8c8c-71466251a162