/* This function call the pEntry callback from a different context.  */
OsiReturnVal_e osi_Spawn(P_OSI_SPAWN_ENTRY pEntry, void *pValue, unsigned long flags)
/* This function call the pEntry callback from a different context.  */
OsiReturnVal_e osi_Spawn(P_OSI_SPAWN_ENTRY pEntry, void *pValue, unsigned long flags)
{
	tSimpleLinkSpawnMsg Msg;
	Msg.pEntry = pEntry;
	Msg.pValue = pValue;
	xHigherPriorityTaskWoken = pdFALSE;
	if(pdTRUE == xQueueSendFromISR( xSimpleLinkSpawnQueue, &Msg, &xHigherPriorityTaskWoken ))
	{
		if( xHigherPriorityTaskWoken )
		{
			taskYIELD ();
		}
		return OSI_OK;
	}
	return OSI_OPERATION_FAILED;
}