* [Qemu-devel] [5325] Really fix the BSD build this time
@ 2008-09-26 16:12 Anthony Liguori
0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2008-09-26 16:12 UTC (permalink / raw)
To: qemu-devel
Revision: 5325
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5325
Author: aliguori
Date: 2008-09-26 16:12:14 +0000 (Fri, 26 Sep 2008)
Log Message:
-----------
Really fix the BSD build this time
struct aioinit isn't defined on BSD it appears so we need to guard everything
in an #if defined(__linux__).
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
trunk/block-raw-posix.c
Modified: trunk/block-raw-posix.c
===================================================================
--- trunk/block-raw-posix.c 2008-09-26 16:04:40 UTC (rev 5324)
+++ trunk/block-raw-posix.c 2008-09-26 16:12:14 UTC (rev 5325)
@@ -569,7 +569,6 @@
{
sigset_t mask;
PosixAioState *s;
- struct aioinit ai;
if (posix_aio_state)
return 0;
@@ -590,18 +589,24 @@
qemu_aio_set_fd_handler(s->fd, posix_aio_read, NULL, posix_aio_flush, s);
- memset(&ai, 0, sizeof(ai));
-#if !defined(__linux__) || (defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 4))
- ai.aio_threads = 5;
- ai.aio_num = 1;
+#if defined(__linux__)
+ {
+ struct aioinit ai;
+
+ memset(&ai, 0, sizeof(ai));
+#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 4)
+ ai.aio_threads = 64;
+ ai.aio_num = 64;
#else
- /* XXX: aio thread exit seems to hang on RedHat 9 and this init
- seems to fix the problem. */
- ai.aio_threads = 1;
- ai.aio_num = 1;
- ai.aio_idle_time = 365 * 100000;
+ /* XXX: aio thread exit seems to hang on RedHat 9 and this init
+ seems to fix the problem. */
+ ai.aio_threads = 1;
+ ai.aio_num = 1;
+ ai.aio_idle_time = 365 * 100000;
#endif
- aio_init(&ai);
+ aio_init(&ai);
+ }
+#endif
posix_aio_state = s;
return 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-09-26 16:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-26 16:12 [Qemu-devel] [5325] Really fix the BSD build this time Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).