>
This module contains the functions that manages access locks.
Function Number | Function Name | Arguments | Return Value |
---|---|---|---|
ACQUIRE_KERN_LOCK = 1 | Acquire Kernel Lock | NIL | NIL |
ACQUIRE_SCHED_LOCK = 2 | Acquire Scheduler Lock | NIL | NIL |
ACQUIRE_GLOCK = 3 | Acquire Glock (Unused) | NIL | NIL |
RELEASE_LOCK = 4 | Release Lock | LockVarAddress | NIL |
if (core is SECONDARY_CORE){ if (PAGING_STATUS or LOGOUT_STATUS is on){ // eXpOS design does not permit a process to execute critical code on the secondary core when paging or logout is ongoing. Set the state of current process to READY Call the switch_context() function of the Scheduler Module. /* Scheduler Module requires appropriate modifications before running on the NEXSM machine */ } } while ( tsl (KERN_LOCK) == 1 ){ continue; } return;Called by all system calls, exception handler and timer interrupt handler.
while ( tsl (SCHED_LOCK) == 1 ){ continue; } return;Called by the Scehduler module.
while ( tsl (GLOCK) == 1 ){ continue; } return;
Store 0 to the address LockVarAddress. return;Called by all system calls, exception handler, timer interrupt handler and scheduler.