/* * ======== Core_unlock ======== */ Void Core_unlock() { // TODO Check BIOS.swiEnabled and BIOS.taskEnabled before using // Task_enabled() and Swi_enabled() APIs as Tasking/Swis // may be disabled. if (Task_enabled() && Swi_enabled()) { GateSmp_leave(Core_gate, 0); } }
/* * ======== Core_unlock ======== */ Void Core_unlock() { UInt hwiKey, coreId; /* Hwi_disable() */ hwiKey = _set_interrupt_priority(Hwi_disablePriority); coreId = Core_getId(); // TODO Check BIOS.swiEnabled and BIOS.taskEnabled before using // Task_enabled() and Swi_enabled() APIs. if (Core_module->gateEntered[coreId]) { if (Task_enabled() && Swi_enabled()) { GateSmp_leave(Core_gate, 0); Core_module->gateEntered[coreId] = FALSE; } } /* Hwi_restore() */ _set_interrupt_priority(hwiKey); }