MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_hw_spin_lock_init

Function rt_hw_spin_lock_init

libcpu/aarch64/common/cpu.c:72–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70};
71
72void rt_hw_spin_lock_init(rt_hw_spinlock_t *_lock)
73{
74 union _spinlock *lock = (void *)_lock;
75
76 /**
77 * just a dummy note that this is an atomic operation, though it alway is
78 * even without usage of atomic API in arm64
79 */
80 atomic_store_explicit(&lock->_value, 0, memory_order_relaxed);
81}
82
83rt_bool_t rt_hw_spin_trylock(rt_hw_spinlock_t *_lock)
84{

Callers 3

rt_smp_call_initFunction · 0.50
rtthread_startupFunction · 0.50
rt_spin_lock_initFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected