[openib-general] [libibcm] does the libibcm support multithreaded applications?
Sean Hefty
mshefty at ichips.intel.com
Mon Aug 7 10:37:28 PDT 2006
Dotan Barak wrote:
> I have a multithreaded test (qp_test) and i tried to add support to the
> libibcm: every thread is calling the ib_cm_get_device function and get a
> cm_device_handle. I checked the handles and it seems that both of the threads
> get the same CM device handle, thing which causes to thread X sometimes get
> the event which i wanted to send to thread Y.
This is correct based on the current implementation. The library opens the CM
files once.
> How should a multithreaded application need to work with the libibcm?
I understand what the problem is, and I think you're right. If
ib_cm_get_device() returned a new ib_cm_device, you could more easily control
event processing. I will fix this up when I remove the dependency on libsysfs
from the libibcm. I am probably at least 2 weeks away from starting on this though.
- Sean
More information about the general
mailing list