counting semaphore using Test&Set

bowrim

Estimable
Aug 18, 2015
2
0
4,510
Give pseudocode to indicate how a counting semaphore (not a binary semaphore) can be implemented using a Test&Set() hardware primitive.