interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

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
5struct ck_spinlock ck_spin_asm_lock;
6unsigned ck_spin_asm_count;
7
8void ck_spin_asm_locked(void);
9void 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}