On Mon, 12 Sep 2005, Sean Hefty wrote:

> James Lentini wrote:
> > The purpose of this function would be more obvious if you included the new
> > comp_handler and cq_contex in the function signature. A different name would
> > help as well. 
> > I would suggest:
> > 
> > void ib_modify_cq(struct ib_cq *cq,                   void 
> > (*event_handler)(struct
> > ib_event *, void *),
> >                   void *cq_context);
> 
> I think that this makes more sense.  It keeps the synchronization 
> internal to the verbs layer, and prevents the user from overwriting 
> the event_handler at the same time that it may be read by the hca 
> driver.  Can we rely on a write to the cq->event_handler being 
> atomic wrt a read of the same value?

Along those same lines, we should also ensure that when both the 
event_handler and cq_context are changed at the same time, the update 
is atomic.

james
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to