Patent ID: 7117481

Claim:
In a computer system that has a hardware platform, a software platform and a plurality of processes running in user-defined domains, a lock comprising: A) a platform-dependent lock component that operates as a semaphore with a wait function and a signal function; B) a front-end lock component comprising computer instructions i) for acquiring the lock by performing a first operation on a variable, which indicates how many of the processes currently hold or wish to acquire the lock, a) by atomically changing the variable by a first predetermined amount as part of the first operation; and b) by calling the wait function of the platform-dependent lock component if the variable meets a first comparison condition relative to a predetermined first threshold value, ii) for releasing the lock by performing a second operation on the variable a) by atomically changing the variable by a second predetermined amount as part of the second operation; and b) by calling the signal function of the platform-dependent lock component if the variable meets a second comparison condition relative to a predetermined second threshold value; C) the processes calling the front-end lock component in order to acquire the lock regardless of the domain in which each process is currently executing; D) the platform-dependent lock component and the front-end lock component being accessible from different domains; E) only one of the processes at a time thereby being allowed to acquire the lock.