[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 09/15] libxl: datacopier: provide "prefix data" facilit



Ian Campbell writes ("Re: [Xen-devel] [PATCH 09/15] libxl: datacopier: provide 
"prefix data" facilit"):
> On Thu, 2012-05-31 at 11:32 +0100, Ian Jackson wrote:
> >   +     * It is safe for this to be called immediately after _start, as
> >   +     * is documented in the public comment.  _start's caller must have
> >   +     * the mutex locked, so other threads don't get to mess with the
> >   +     * contents, and the fd events cannot happen reentrantly.
> 
> Perhaps this could be more explicit about having to hold the mutex from
> before _start until after any _prefixdata calls?

OK:

  /* Inserts literal data into the output stream.  The data is copied.
   * May safely be used only immediately after libxl__datacopier_start
   * (before the ctx is unlocked).  But may be called multiple times.
   * NB exceeding maxsz will fail an assertion! */
  _hidden void libxl__datacopier_prefixdata(libxl__egc*, 
libxl__datacopier_state*,
                                            const void *data, size_t len);

> "The mutex" here is the CTX lock, right?

Yes.  I've clarified that by writing `ctx locked' instead.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.