A method and apparatus for providing a synchronization mechanism to control
accesses to a non-cached shared resource by devices connected by a high
speed interconnect is herein described. A semaphore is used to control
access to a shared resource which is implemented by a pair of semaphore
registers. A previous semaphore register is used to store the previous
owner of the semaphore and a current semaphore register is used to either
store the current owner of the semaphore or indicate that the semaphore is
available. The current semaphore register is updated when the semaphore is
available and is being taken or when the semaphore is being freed. The
previous semaphore register is updated when the semaphore is freed.