[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/14] qio: refcount QIOTask
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH 10/14] qio: refcount QIOTask |
Date: |
Wed, 28 Feb 2018 20:54:00 +0800 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Wed, Feb 28, 2018 at 09:16:59AM +0000, Daniel P. Berrangé wrote:
> On Wed, Feb 28, 2018 at 01:06:29PM +0800, Peter Xu wrote:
> > It will be used in multiple threads in follow-up patches. Let it start
> > to have refcounts.
> >
> > Signed-off-by: Peter Xu <address@hidden>
> > ---
> > include/io/task.h | 3 +++
> > io/task.c | 23 ++++++++++++++++++++++-
> > 2 files changed, 25 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/io/task.h b/include/io/task.h
> > index 9dbe3758d7..c6acd6489c 100644
> > --- a/include/io/task.h
> > +++ b/include/io/task.h
> > @@ -322,4 +322,7 @@ gpointer qio_task_get_result_pointer(QIOTask *task);
> > */
> > Object *qio_task_get_source(QIOTask *task);
> >
> > +void qio_task_ref(QIOTask *task);
> > +void qio_task_unref(QIOTask *task);
>
> It should just be turned back into a QObject as it was originally,
> so we get refcounting for free.
Could you point me the commit that has the original code? I would be
glad to revert to that, or yeah I can switch to QObject too. Thanks,
--
Peter Xu
[Qemu-devel] [PATCH 11/14] qio/chardev: return QIOTask when connect async, Peter Xu, 2018/02/28
[Qemu-devel] [PATCH 12/14] qio: move QIOTaskThreadData into QIOTask, Peter Xu, 2018/02/28
[Qemu-devel] [PATCH 13/14] qio: allow threaded qiotask to switch contexts, Peter Xu, 2018/02/28