[openib-general] [PATCH] ib_sync_cq ( was Re: RFC: ib_set_comp_handler)

Sean Hefty mshefty at ichips.intel.com
Mon Sep 12 14:09:17 PDT 2005


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?

- Sean



More information about the general mailing list