Question d’entretien chez Apple

Create a synchronization primitive for the operating system/kernel from scratch. I created a spinlock with test-and-set. Next, create a primitive that doesn't waste CPU cycles. (Essentially, how would you create a mutex inside the kernel?)