Il 1/16/2012 23:35 PM, Jason Gunthorpe ha scritto:
On Tue, Jan 17, 2012 at 12:15:23AM +0200, Or Gerlitz wrote:
Flavio Baronti<[email protected]>  wrote:
what is then the proper way to stop a thread blocked on
rdma_get_cm_event() (or on ibv_get_cq_event())?

Oh, this is simple - don't get there... have your code

1. get the FDs associated with IB - which you can retrieve from
librdmacm and from libibverbs

2. make them non blocking

3. add them to you select/poll  FD group

4. Use an eventfd or otherwise to break out of the select/poll loop
and then exit your thread.

Jason

Thanks, I did not think about eventfd+select.

Flavio
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to