atomic_xchg{,_relaxed,_acquire,_release}()atomic_cmpxchg{,_relaxed,_acquire,_release}()atomic_tr...
ATOMIC_LONG_PFX(_t) *v = (ATOMIC_LONG_PFX(_t) *)l; \ \ return (long)ATOMIC_LONG_PFX(_fetch_##op##mo)(i, v); \ } ATOMIC_LONG_FETCH_OP(add, ) ATOMIC_LONG_FETCH_OP(add, _relaxed) ATOMIC_LONG_FETCH_OP(add, _acquire) ATOMIC_LONG_FETCH_OP(add, _release) ATOMIC_LONG_F...
{structmutex*lock=container_of(lock_count,structmutex,count);unsignedlongflags;intprev;/* No need to trylock if the mutex is locked. */if(mutex_is_locked(lock))return0; spin_lock_mutex(&lock->wait_lock, flags); prev =atomic_xchg(&lock->count,-1);if(likely(prev ==1)) { mutex_se...
arch_try_cmpxchg_relaxed(__ai_ptr, __ai_oldp, __VA_ARGS__); \ }) @@ -2077,17 +2077,17 @@ atomic_long_dec_if_positive(atomic_long_t *v) typeof(ptr) __ai_ptr = (ptr); \ typeof(oldp) __ai_oldp = (oldp); \ kcsan_mb(); \ instrument_atomic_write(__ai_ptr, size...
flags)static__always_inlinevoidspin_unlock_irqrestore(spinlock_t*lock,unsignedlongflags)//include/lin...
pc_region*acquire(){pc_sys_anchorcmp(head.load(rl::memory_order_relaxed)); pc_sys_anchor xchg;do{ xchg.refcnt = cmp.refcnt +2; xchg.region = cmp.region; }while(false== head.compare_exchange_weak(cmp, xchg, rl::memory_order_acquire));returncmp.region; ...
High-speed Large Language Model Serving on PCs with Consumer-grade GPUs - PowerInfer/atomic_windows.h at main · kp-forks/PowerInfer
Provide feedback We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up {...
void*amiga_chip_alloc_res(unsignedlongsize, struct resource *res){interror;/* round up */size = PAGE_ALIGN(size); pr_debug("amiga_chip_alloc_res: allocate %lu bytes\n", size); error = allocate_resource(&chipram_res, res, size,0, UINT_MAX, ...
atomic_fetch_{add,sub,inc,dec}{,_relaxed,_acquire,_release}() Bitwise 位运算: atomic_{and,or,xor,andnot}() atomic_fetch_{and,or,xor,andnot}{,_relaxed,_acquire,_release}() Swap 交换: atomic_xchg{,_relaxed,_acquire,_release}() ...