Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/native/kernel/tests/spinlock_tu.c # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / native / kernel / tests / spinlock_tu.c` 14 lines ยท 528 bytes Raw Blame History 1 /* spinlock_tu.c -- one freestanding translation unit around core/spinlock.h, compiled by "make spinlock-asm-check" 2 * for aarch64 and x86-64 so tools/ck_spinlock_asm_check.sh can check the instruction order. Not linked anywhere. */ 3 #include "spinlock.h" 4 5 struct ck_spinlock ck_spin_asm_lock; 6 unsigned ck_spin_asm_count; 7 8 void ck_spin_asm_locked(void); 9 void ck_spin_asm_locked(void) 10 { 11 ck_irqflags_t f = ck_spin_lock_irqsave(&ck_spin_asm_lock); 12 ck_spin_asm_count++; 13 ck_spin_unlock_irqrestore(&ck_spin_asm_lock, f); 14 }