[Spice-devel] [PATCH v3] qxl: inline documentation for get_command and req_cmd_notification

Frediano Ziglio fziglio at redhat.com
Wed Jan 27 07:52:04 PST 2016


> 
> On Wed, 2016-01-27 at 06:52 -0500, Frediano Ziglio wrote:
> > > 
> > > From: Frediano Ziglio <fziglio at redhat.com>
> > > 
> > > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > > Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
> > > ---
> > > 
> > > Changes:
> > >  - add some newlines
> > >  - fix documentation for return of get_command
> > > 
> > >  server/spice-qxl.h | 10 ++++++++++
> > >  1 file changed, 10 insertions(+)
> > > 
> > > diff --git a/server/spice-qxl.h b/server/spice-qxl.h
> > > index e1f14e7..4d02a84 100644
> > > --- a/server/spice-qxl.h
> > > +++ b/server/spice-qxl.h
> > > @@ -166,7 +166,17 @@ struct QXLInterface {
> > >      void (*set_mm_time)(QXLInstance *qin, uint32_t mm_time)
> > >      SPICE_GNUC_DEPRECATED;
> > >  
> > >      void (*get_init_info)(QXLInstance *qin, QXLDevInitInfo *info);
> > > +
> > > +    /* Retrieve the next command to be processed
> > > +     * This call should be non-blocking. If no commands are available,
> > > it
> > > +     * should return 0, or 1 if a command was retrieved */
> > 
> > Currently <>0 (any C true value) is fine, not only 1.
> 
> Right, spice-server currently accepts any non-zero value. But I think it's
> useful to suggest in the documentation that people implementing this function
> should use only 0 or 1, even if we technically can handle values other than
> 1.
> 
> 
> > 
> > >      int (*get_command)(QXLInstance *qin, struct QXLCommandExt *cmd);
> > > +
> > > +    /* Request notification when new commands are available
> > > +     * When a new command becomes available, the spice server should be
> > > +     * notified by calling spice_qxl_wakeup(). If commands are already
> > > +     * available, this function should return FALSE and no notification
> > > +     * triggered */
> > 
> > This is a C interface. stdbool.h define false, not FALSE.
> 
> OK. Would you be willing to ACK If I change s/FALSE/false/?
> 

Yes!

> > 
> > >      int (*req_cmd_notification)(QXLInstance *qin);
> > >      void (*release_resource)(QXLInstance *qin, struct QXLReleaseInfoExt
> > >      release_info);
> > >      int (*get_cursor_command)(QXLInstance *qin, struct QXLCommandExt
> > >      *cmd);
> > 
> > Frediano
> 

Frediano


More information about the Spice-devel mailing list