摘要 |
Hardware resource sharing for a computerized system running software tasks. A mutex controller is associated with the hardware resource. Lock and unlock indicators are settable by a software task and readable by the controller, and locked and waiters flags are settable and readable by the controller. The controller monitors whether the lock indicator has been set and determines whether the locked flag is set. If not, it sets the locked flag and, if so, it sets the waiters flag and asserts a mutex interrupt signaling the computer system to divert the software task to run a lock request routine. The controller also monitors whether the unlock indicator has been set and then determines whether the waiters flag is set. If not, it clears the locked flag and, if so, it asserts a mutex interrupt signaling the computer system to divert the software task to run an unlock request routine.
|