Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/lib/refcount.h

    r09ab0a9a r95d45482  
    6464static inline void refcount_up(atomic_refcount_t *rc)
    6565{
    66         // XXX: We can use relaxed operation because acquiring a reference
    67         //      implies no ordering relationships. A reference-counted object
    68         //      still needs to be synchronized independently of the refcount.
     66        // NOTE: We can use relaxed operation because acquiring a reference
     67        //       implies no ordering relationships. A reference-counted object
     68        //       still needs to be synchronized independently of the refcount.
    6969
    7070        int old = atomic_fetch_add_explicit(&rc->__cnt, 1,
     
    9696static inline bool refcount_down(atomic_refcount_t *rc)
    9797{
    98         // XXX: The decrementers don't need to synchronize with each other,
    99         //      but they do need to synchronize with the one doing deallocation.
     98        // NOTE: The decrementers don't need to synchronize with each other,
     99        //       but they do need to synchronize with the one doing deallocation.
    100100        int old = atomic_fetch_sub_explicit(&rc->__cnt, 1,
    101101            memory_order_release);
     
    104104
    105105        if (old == 0) {
    106                 // XXX: We are holding the last reference, so we must now
    107                 //      synchronize with all the other decrementers.
     106                // NOTE: We are holding the last reference, so we must now
     107                //       synchronize with all the other decrementers.
    108108
    109109                int val = atomic_load_explicit(&rc->__cnt,
Note: See TracChangeset for help on using the changeset viewer.