xchg 56 main.c xchg(&(mycpu()->started), 1); // tell startothers() we're up xchg 32 spinlock.c while(xchg(&lk->locked, 1) != 0)