Broadcom interview question

how does semaphores work on multi-core machines