Changeset 1a1e124 in mainline


Ignore:
Timestamp:
2024-01-25T14:19:29Z (11 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
07d4271
Parents:
a5b5f17
Message:

Add static refcount initializer

File:
1 edited

Legend:

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

    ra5b5f17 r1a1e124  
    4949} atomic_refcount_t;
    5050
     51#define REFCOUNT_INITIALIZER() { \
     52        .__cnt = ATOMIC_VAR_INIT(0), \
     53}
     54
    5155static inline void refcount_init(atomic_refcount_t *rc)
    5256{
    53         atomic_store_explicit(&rc->__cnt, 0, memory_order_relaxed);
     57        atomic_init(&rc->__cnt, 0);
    5458}
    5559
Note: See TracChangeset for help on using the changeset viewer.