xchg 60 main.c xchg(&cpu->started, 1); // tell startothers() we're up xchg 34 spinlock.c while(xchg(&lk->locked, 1) != 0) xchg 61 spinlock.c xchg(&lk->locked, 0);