/* note This function must be called when the lock is not disabled.  */
void XRDC2_LockMemSlotExclAccess(XRDC2_Type *base, xrdc2_mem_slot_t memSlot)
/* note This function must be called when the lock is not disabled.  */
void XRDC2_LockMemSlotExclAccess(XRDC2_Type *base, xrdc2_mem_slot_t memSlot)
{
    uint8_t curDomainID;
    volatile uint32_t *lockReg = &(base->MSCI_MSAC_WK[(uint32_t)memSlot].MSC_MSAC_W1);
    curDomainID = XRDC2_GetCurrentMasterDomainId(base);
    while (true)
    {
        *lockReg = XRDC2_EAL_LOCKED;
        if (curDomainID == XRDC2_GetMemSlotExclAccessLockDomainOwner(base, memSlot))
        {
            break;
        }
    }
    return;
}