* [Qemu-devel] [PATCH 3/3] Use mmap() within code_gen_alloc() for OpenBSD.
@ 2010-12-21 2:25 Brad
2010-12-21 13:05 ` Andreas Färber
0 siblings, 1 reply; 3+ messages in thread
From: Brad @ 2010-12-21 2:25 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Brad Smith <brad@comstyle.com>
---
exec.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/exec.c b/exec.c
index 42a35e0..e513d16 100644
--- a/exec.c
+++ b/exec.c
@@ -517,7 +517,8 @@ static void code_gen_alloc(unsigned long tb_size)
exit(1);
}
}
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
+ || defined(__DragonFly__) || defined(__OpenBSD__)
{
int flags;
void *addr = NULL;
--
1.7.3.2
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 3/3] Use mmap() within code_gen_alloc() for OpenBSD.
2010-12-21 2:25 [Qemu-devel] [PATCH 3/3] Use mmap() within code_gen_alloc() for OpenBSD Brad
@ 2010-12-21 13:05 ` Andreas Färber
2010-12-21 14:09 ` Brad
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2010-12-21 13:05 UTC (permalink / raw)
To: Brad, qemu-devel Developers
Cc: HaikuPorts developers discussion list, Blue Swirl
Am 21.12.2010 um 03:25 schrieb Brad:
> Signed-off-by: Brad Smith <brad@comstyle.com>
>
> ---
> exec.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/exec.c b/exec.c
> index 42a35e0..e513d16 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -517,7 +517,8 @@ static void code_gen_alloc(unsigned long tb_size)
> exit(1);
> }
> }
> -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
> defined(__DragonFly__)
> +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
> + || defined(__DragonFly__) || defined(__OpenBSD__)
Brad, thanks for making me aware of this part of code! Haiku is not
handled here either, falling back to malloc(), which breaks there.
When using mmap() on Haiku, weird qemu_malloc() workarounds with BeOS
areas are no longer necessary.
As for a fix, shouldn't we do this the autoconf way and do feature
tests rather than testing for known platforms? I.e. #elif
defined(HAVE_MMAP) with HAVE_MMAP getting defined by configure?
Andreas
> {
> int flags;
> void *addr = NULL;
> --
> 1.7.3.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 3/3] Use mmap() within code_gen_alloc() for OpenBSD.
2010-12-21 13:05 ` Andreas Färber
@ 2010-12-21 14:09 ` Brad
0 siblings, 0 replies; 3+ messages in thread
From: Brad @ 2010-12-21 14:09 UTC (permalink / raw)
To: Andreas Färber, qemu-devel Developers
Cc: HaikuPorts developers discussion list, Blue Swirl
----- Original message -----
> Am 21.12.2010 um 03:25 schrieb Brad:
>
> > Signed-off-by: Brad Smith <brad@comstyle.com>
> >
> > ---
> > exec.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/exec.c b/exec.c
> > index 42a35e0..e513d16 100644
> > --- a/exec.c
> > +++ b/exec.c
> > @@ -517,7 +517,8 @@ static void code_gen_alloc(unsigned long tb_size)
> > exit(1);
> > }
> > }
> > -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
> > defined(__DragonFly__)
> > +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
> > + || defined(__DragonFly__) || defined(__OpenBSD__)
>
> Brad, thanks for making me aware of this part of code! Haiku is not
> handled here either, falling back to malloc(), which breaks there.
>
> When using mmap() on Haiku, weird qemu_malloc() workarounds with BeOS
> areas are no longer necessary.
>
> As for a fix, shouldn't we do this the autoconf way and do feature
> tests rather than testing for known platforms? I.e. #elif
> defined(HAVE_MMAP) with HAVE_MMAP getting defined by configure?
Well I think it would be nice if possible to try and eliminate such hardcoded lists of Operating Systems via ifdefs and try to test for the features instead.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-21 14:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-21 2:25 [Qemu-devel] [PATCH 3/3] Use mmap() within code_gen_alloc() for OpenBSD Brad
2010-12-21 13:05 ` Andreas Färber
2010-12-21 14:09 ` Brad
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).