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

Re: [Xen-devel] [PATCH 10/11] mini-os/xenbus: Provide queue->wakeup hook



Samuel Thibault writes ("Re: [Xen-devel] [PATCH 10/11] mini-os/xenbus: Provide 
queue->wakeup hook"):
> Ian Jackson, le Fri 20 Jun 2014 20:04:49 +0100, a écrit :
> > This allows xenbus's caller to get called back when an item is put on
> > the queue, rather than simply having the waitq signaled.
> 
> Mmm, so the callback will be made with lock held, is that not a problem
> in the use you plan?

No.  My callback function just needs to call a NetBSD kernel file
descriptor poll() wakeup hook.

> Although I don't usually like callbacks precisely for that kind of
> reason, I'm not against it, but it should at least be documented.
...
> > +/*
> > + * Use of queue->wakeup:
> > + *
> > + * If queue->wakeup is set, it will be called instead of
> > + * wake_up(&queue->waitq);
> > + *
> > + * queue->wakeup is initialised (to a function which just calls
> > + * wake_up) by xenbus_event_queue_init.  The user who wants something
> > + * different should set ->wakeup after the init, but before the queue
> > + * is used for xenbus_id_allocate or xenbus_watch_prepare.
> > + *
> > + * queue->wakeup() is called with the req_lock held.
> > + */

Here it is :-).

Thanks,
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®.