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.

Help for GateMp problem with C6678

Hi everybody,

I have a problem with GateMP using on C6678...

I have a master program loads on core0 and a slave program loads on core1-7.

I create a GateMP "myGate" on core0 and hope all 8 cores could use it.

The code to create GateMP on core0 looks like:

void tsk_master()
{	
        GateMP_Params gparams;
	GateMP_Handle gateHandle;
	IArg key;

GateMP_Params_init(&gparams); gparams.localProtect = GateMP_LocalProtect_THREAD; gparams.remoteProtect = GateMP_RemoteProtect_SYSTEM; gparams.name = "myGate"; gparams.regionId = 0; /* Create the gate */ gateHandle = GateMP_create(&gparams); /* Enter the gate */ key = GateMP_enter(gateHandle); System_printf("GateMP_enter\n"); /* Leave the gate */ GateMP_leave(gateHandle, key); }

The code to open and use "myGate" on core1-7 looks like:

void tsk_slave()
{    
        /* Open a gate */
        status = GateMP_open("myGate", &gateHandle);

        /* Enter the gate */
	key = GateMP_enter(gateHandle);

        // do something...

	/* Leave the gate */
	GateMP_leave(gateHandle, key);

        /* Close the gate */
	GateMP_close(&gateHandle);
}



Here is the problem: when the slave cores run to GateMP_open, they didn't go on...

Could you please help me?
Thank you!
Regards,

Richard
  • Hi Richard,

    I noticed that you haven't received any response on this question yet.  I have moved this thread over to the device forum in hopes that you will get a faster response there.

  • Hi Richard,

    Can you try issuing GateMP_open() calls from the slave side in a busy loop until 'status' indicates success?

    If all cores run concurrently, it is possible that by the time the slave gets to executing the GateMP_open in your original case the gate may not have been created yet. At any rate you should be testing the status returned by the GateMP_open call.

    Murat