This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GateMP too slow



Is there any alternative way to protect shared memory except GateMP

Following code

	unsigned ts1 = Timestamp_get32();
	IArg key = GateMP_enter(gate);
	GateMP_leave(gate, key);
	unsigned ts2 = Timestamp_get32();
	printf("Gate enter/leave in %d ns\n", ts2 - ts1);

runs 6500 cycles which is too slow. 

What is a common way of fast memory protection in SYS/BIOS, may be spinlocks. Or maybe there are SoC registers in C6678 for this purposes which are read in 1 cycle.