On Wed, 18 Feb 2009 03:49:55 +0200
Sasha Khapyorsky <[email protected]> wrote:

> On 17:23 Tue 17 Feb     , Ira Weiny wrote:
> > 
> > Neither interface is thread safe without the user implementing some
> > sort of locking around the calls.
> 
> Really? What about this:
> 
> int plus_three(int a)
> {
>       return a + 3;
> }
> 
> We could extrapolate of course.
> 

I don't get it?

Having static data like:

static int mad_portid = -1;
static int class_agent[MAX_CLASS];

Makes some functions dangerous.

Then the other interface does not provide any locking...  Oh I guess you are
saying that "a" is ibmad_port thingy...  Then yes if you don't have threads
modifying it at the same time you will be ok.

Ira

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

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

Reply via email to