On 19:29 Mon 06 Mar , Michael S. Tsirkin wrote: > > > > Do you mean 'asm/atomic.h' from linux kernel? If so it is kernel's code > > (many systems export it as /usr/include/asm/atomic.h however). > > > > Also I'm not sure about licensing - how kernel's GPL is compatible with > > OpenSM's dual license? > > > > Sasha. > > Sasha, from experience, do not go this way - don't use directly or copy > asm/atomic.h. > > It will break in enexpected ways, e.g. on my system I have > sm/atomic.h pulling in asm-x86_64/atomic.h, and that pulls in > #include <linux/config.h> which is typically not safe. > > The right thing to do is to look at the implementation > and write your own for architectures that matter. > Use lock for others.
Thanks for the info Michael. I would prefer to remove atomic stuff from opensm - this will be architecture independent (I didn't look at this too close yet). Sasha. _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
