|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool |
Date: | Mon, 08 Dec 2008 12:23:29 -0600 |
User-agent: | Thunderbird 2.0.0.17 (X11/20080925) |
Blue Swirl wrote:
On 12/5/08, Anthony Liguori <address@hidden> wrote:Some cleanup needed here?
Hrm, yeah.
+int _compat_aio_init(struct aioinit *aioinit) +static int _compat_aio_submit(struct aiocb *aiocb, int is_write) +int _compat_aio_read(struct aiocb *aiocb) +int _compat_aio_write(struct aiocb *aiocb) +ssize_t _compat_aio_return(struct aiocb *aiocb) +int _compat_aio_error(struct aiocb *aiocb) +int _compat_aio_cancel(int fd, struct aiocb *aiocb)The names should not begin with an underscore.
This okay by C99, if we're going to rename the aioinit structure, we might as well just rename it all to qemu_aio_XX or something like that.
+struct aiocb +{ + int aio_fildes; + void *aio_buf; + size_t aio_nbytes; + struct sigevent aio_sigevent; + off_t aio_offset; + + /* private */ + TAILQ_ENTRY(aiocb) node; + int is_write; + ssize_t ret; + int active; +}; + +struct aioinit +{ + int aio_threads; + int aio_num; + int aio_idle_time; +};These structs should probably be named qemu_aiocb and qemu_aioinit to avoid conflict with system types. I like to use unsigned types whenever possible, IIRC compilers may generate better code with those.
Yeah, I don't disagree. I was trying to maintain glibc compatibility. That's not strictly necessary though.
Regards, Anthony Liguori
-- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to address@hidden More majordomo info at http://vger.kernel.org/majordomo-info.html
[Prev in Thread] | Current Thread | [Next in Thread] |