Quoting Krishna Kumar2 <[EMAIL PROTECTED]>:
> stop_thread()
> {
> clear_bit();
> lock(); /* empty lock/unlock to synchronize with the
> mcast_send() */
> unlock(); /* make the other routine FINISH before we start other
> activity */
> ...
> ...
> }
> mcast_send()
> {
> lock();
> if (test_bit)
> ...
> ...
> unlock();
> }
I think this will work, too. But I have easier time reasoning about locks than
barriers and atomic operations. "bit is protected by priv->lock" is a simple
rule, and we are not on data path here.
The fact that the race went unnoticed for a while validates this approach
in my eyes.
--
MST
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general