Now, my Z4 core is responsible for Ethernet communication and Z2 core is responsible for CANFD communication.CANFD has a shared memory for receiving data, and Ethernet has a shared memory for receiving data.So I used two mutex locks to protect these two shared memory Spaces.But it triggers a deadlock.The brief code is as follows:

When the z4 core main program obtains the can_mutex, the Z2 core main program also obtains the enet_mutex. Both cores then trigger an interrupt when the mutex is not released, and both are stuck where the lock was obtained.
If I am not clear, please tell me what else you would like to know.Finally, I would like to ask if there is any good advice for me.Than you very much!!!