> static inline int get_obj_refcount(struct foo *obj)
> {
> int c;
>
> spin_lock_irq(&obj->lock);
> c = atomic_read(&obj->refcount);
> spin_unlock_irq(&obj->lock);
>
> return c;
> }
>
> be acceptable?
That looks pretty silly to me. Especially since you need the lock
around the atomic_dec too.
Changing the refcount to an int doesn't seem like that daunting a
change to make...
- R.
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general