Somnath kotur wrote:
Hi All,
I am unable to find the equivalent of the atomic_read() call in linux,
most nic driver implementations that i am seeing in opensolaris seem to declare
a uint32_t and then do atomic_add_32 and atomic_sub() seems to be implemented
as atomic_add_32( b ,-a) , while the add/sub operations might work fine , im
not sure if my atomic_read() which im just reading as is #define atomic_read(a)
(*(a) ) would suffice?
You might want to look at the _nv variants of the atomic operations.
Example : man atomic_add_32_nv.
Also, seen if atomic_or_*_nv will help with the bits argument passed as
0 to "fake" atomic_read [You could use add, sub, inc, dec - any of the
operations with 0, but bitwise OR might be the fastest].
Pavan
Thanks
Som
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss