[Qemu-devel] Re: [PATCH v6] Introduce qemu_madvise()

2010-09-15 Thread Andreas Färber
Am 15.09.2010 um 21:50 schrieb Blue Swirl: On Wed, Sep 15, 2010 at 7:35 PM, Andreas Färber > wrote: Maybe return -1 and set errno to the posix_madvise() return code? (but is it errno = -retval or errno = retval then?) An advantage of posix_madvise() semantics is that no mucking with errno i

[Qemu-devel] Re: [PATCH v6] Introduce qemu_madvise()

2010-09-15 Thread Blue Swirl
On Wed, Sep 15, 2010 at 7:35 PM, Andreas Färber wrote: > Am 15.09.2010 um 21:00 schrieb Blue Swirl: > >> madvise() actually >> returns 0 or -1 with error code in errno. Should we try to match that? > > posix_madvise() doesn't seem to... "otherwise, an error number shall be > returned to indicate t

[Qemu-devel] Re: [PATCH v6] Introduce qemu_madvise()

2010-09-15 Thread Andreas Färber
Am 15.09.2010 um 21:00 schrieb Blue Swirl: madvise() actually returns 0 or -1 with error code in errno. Should we try to match that? posix_madvise() doesn't seem to... "otherwise, an error number shall be returned to indicate the error" It documents EINVAL for invalid advice, and so does m

[Qemu-devel] Re: [PATCH v6] Introduce qemu_madvise()

2010-09-15 Thread Blue Swirl
On Wed, Sep 15, 2010 at 6:09 PM, Andreas Färber wrote: > From: Andreas Färber > > vl.c has a Sun-specific hack to supply a prototype for madvise(), > but the call site has apparently moved to arch_init.c. > > Haiku doesn't implement madvise() in favor of posix_madvise(). > OpenBSD and Solaris 10