You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could be read by multiple threads concurrently, thus a final compare_and_swap is necessary to guarantee atomicity.
But is it only being cleared by one single thread (the one who owns it)? If so, it seems a simple atomic clear_bit() is enough rather than full-fledged cmpxchg. Related code here.
The text was updated successfully, but these errors were encountered:
lastweek
changed the title
About MaskAndCount
Is it necessary to use cmpxchg when clear a bit of MaskAndCount?
Jul 4, 2019
Hi,
Quick question about MaskAndCount.
It could be read by multiple threads concurrently, thus a final compare_and_swap is necessary to guarantee atomicity.
But is it only being cleared by one single thread (the one who owns it)? If so, it seems a simple atomic clear_bit() is enough rather than full-fledged cmpxchg. Related code here.
The text was updated successfully, but these errors were encountered: