[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv2 5/7] Export qemu_sendv_recvv() and use it in q
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-devel] [PATCHv2 5/7] Export qemu_sendv_recvv() and use it in qemu_sendv() and qemu_recvv() |
Date: |
Sun, 11 Mar 2012 19:22:35 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20120216 Icedove/8.0 |
On 11.03.2012 19:00, Paolo Bonzini wrote:
> Il 11/03/2012 02:49, Michael Tokarev ha scritto:
>> Rename do_sendv_recvv() to qemu_sendv_recvv(),
>> change its last arg (do_send) from int to bool,
>> export it in qemu-common.h, and made the two
>> callers of it (qemu_sendv() and qemu_recvv())
>> to be trivial #defines just adding 5th arg.
>
> GCC is smart and knows how to do tail calls in many cases. Thus, I
> don't see very much the point of this patch.
The point is to allow qemu_sendv_recvv() to be used
directly, see the next patch
[PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends
for an example, and see my previous attempt to address
all this with bdrv_* methods where reads and writes
are implemented in common functions and are split
back on layer boundary, just to go to a common
routine on the next layer. Or worse yet, repeating
exactly the same code like in this 6/7 patch for
qemu_co_recvv() and qemu_co_sendv().
It is not about tail calls at all.
Thanks,
/mjt
- [Qemu-devel] [PATCHv2 0/7] cleanup/consolidate some iovec functions, Michael Tokarev, 2012/03/10
- [Qemu-devel] [PATCHv2 5/7] Export qemu_sendv_recvv() and use it in qemu_sendv() and qemu_recvv(), Michael Tokarev, 2012/03/10
- [Qemu-devel] [PATCHv2 1/7] Consolidate qemu_iovec_memset{, _skip}() into single, simplified function, Michael Tokarev, 2012/03/10
- [Qemu-devel] [PATCHv2 2/7] allow qemu_iovec_from_buffer() to specify offset from which to start copying, Michael Tokarev, 2012/03/10
- [Qemu-devel] [PATCHv2 7/7] rewrite and comment qemu_sendv_recvv(), Michael Tokarev, 2012/03/10
- [Qemu-devel] [PATCHv2 4/7] change prototypes of qemu_sendv() and qemu_recvv(), Michael Tokarev, 2012/03/10
- [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends, Michael Tokarev, 2012/03/10