summaryrefslogtreecommitdiffstats
path: root/qemu-common.h
Commit message (Collapse)AuthorAgeFilesLines
* Attached patch fixes a series of this warningblueswir12008-11-161-0/+16
| | | | | | | | | | | when compiling on NetBSD: warning: array subscript has type 'char' Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5727 c046a42c-6fe2-441c-8c8c-71466251a162
* Include <strings.h> for ffs().balrog2008-11-121-0/+1
| | | | | | | | | | | | ffs() is in <strings.h> although bsd compatible systems have it in <string.h> already. ffs() is used in omap1.c, omap2.c, omap_i2c.c, bt-sdp.c. These uses can be replaced with clz32() but ffs is more available. Problem was spotted by malc. Make host-utils.h formatting more consistent. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5708 c046a42c-6fe2-441c-8c8c-71466251a162
* sockets: helper functions for qemu (Gerd Hoffman)aliguori2008-11-111-0/+1
| | | | | | | | | | | | | | | | | | | This patch creates a new source file qemu-sockets.c with a bunch of helper functions to create listening and connected sockets. New features of this code are (a) support for searching for a free port in a given range and (b) support for IPv6. The following patches put that code into use. Compile fixes for Windows added by Anthony Liguori Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5695 c046a42c-6fe2-441c-8c8c-71466251a162
* Add qemu_strndup: qemu_strdup with length limit.balrog2008-11-091-0/+1
| | | | | | | | Also optimise qemu_strdup by using memcpy - using pstrcpy is usually suboptimal. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5653 c046a42c-6fe2-441c-8c8c-71466251a162
* Revert r5532, r5536 and a piece of r5531.balrog2008-11-081-1/+0
| | | | | | | | The use of strncat and strndup was correct, pstrcpy and pstrdup wasn't. I'll try to restore building on non-gnu OSes in a later commit. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5651 c046a42c-6fe2-441c-8c8c-71466251a162
* Clarify qemu_bh_schedule_idle() usagealiguori2008-10-311-0/+6
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5576 c046a42c-6fe2-441c-8c8c-71466251a162
* Make bottom halves more robustaliguori2008-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bottom halves are supposed to not complete until the next iteration of the main loop. This is very important to ensure that guests can not cause stack overflows in the block driver code. Right now, if you attempt to schedule a bottom half within a bottom half callback, you will enter an infinite loop. This patch uses the same logic that we use for the IOHandler loop to make the bottom half processing robust in list manipulation while in a callback. This patch also introduces idle scheduling for bottom halves. qemu_bh_poll() returns an indication of whether any bottom halves were successfully executed. qemu_aio_wait() uses this to immediately return if a bottom half was executed instead of waiting for a completion notification. qemu_bh_schedule_idle() works around this by not reporting the callback has run in the qemu_bh_poll loop. qemu_aio_wait() probably needs some refactoring but that would require a larger code audit. idle scheduling seems like a good compromise. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5572 c046a42c-6fe2-441c-8c8c-71466251a162
* Replace uses of strndup (a GNU extension) with Qemu pstrdupblueswir12008-10-251-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5532 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix IO performance regression in sparcaliguori2008-10-081-0/+3
| | | | | | | | | | | | | | | | | | 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
* Add a "null" bluetooth HCI and a header file for bluetooth.balrog2008-09-281-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5342 c046a42c-6fe2-441c-8c8c-71466251a162
* Add qemu_realloc(), by Gerd Hoffmann.ths2008-08-061-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement resolution switching in common console code.pbrook2008-07-011-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4812 c046a42c-6fe2-441c-8c8c-71466251a162
* Move CPU save/load registration to common code.pbrook2008-06-301-0/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4808 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove osdep.c/qemu-img code duplicationaurel322008-04-111-0/+8
| | | | | | | (Kevin Wolf) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4191 c046a42c-6fe2-441c-8c8c-71466251a162
* Unify RTCs that use host time, fix M48t59 alarm.balrog2008-02-171-0/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3984 c046a42c-6fe2-441c-8c8c-71466251a162
* Use WIN32_LEAN_AND_MEAN, by Stefan Weil.ths2007-12-171-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3832 c046a42c-6fe2-441c-8c8c-71466251a162
* Avoid duplicated definitions: move common definitions from exec-all.hj_mayer2007-11-191-31/+0
| | | | | | | | | | | and qemu-common.h to osdep.h. Include this header in translate-op.c. Make sure it's included first in darwin-user/qemu.h. To avoid discarded inlining bug, define inline as always_inline and always_inline as (( attribute (always_inline) )) __inline__. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3698 c046a42c-6fe2-441c-8c8c-71466251a162
* Break up vl.h.pbrook2007-11-171-0/+71
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
* Split block API from vl.h.pbrook2007-11-111-0/+83
Remove QEMU_TOOL. Replace with QEMU_IMG and NEED_CPU_H. Avoid linking qemu-img against whole system emulatior. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3578 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud