Ejemplo n.º 1
0
static void RPC_FlowCntrl(IPC_BufferPool Pool, IPC_FlowCtrlEvent_T Event)
{
	IPC_EndpointId_T epId = IPC_PoolSourceEndpointId(Pool);
	Int8 type = GetInterfaceType(epId);
	Int8 pool_index;

	if (type != -1) {
		pool_index =
		    rpcGetPoolIndex((PACKET_InterfaceType_t)type, Pool);

		if (ipcInfoList[(int)type].flowControlCb != NULL)
			ipcInfoList[(int)type].flowControlCb((Event ==
							      IPC_FLOW_START) ?
							     RPC_FLOW_START :
							     RPC_FLOW_STOP,
							     (UInt8)((pool_index
								      >=
								      0)
								     ?
								     (pool_index
								      +
								      1) : 0));

		_DBG_(RPC_TRACE
		      ("RPC_FlowCntrl(%c) type=%d event=%d\r\n",
		       (gRpcProcType == RPC_COMMS) ? 'C' : 'A', type, Event));
	}

}
Ejemplo n.º 2
0
IPC_EndpointId_T IPC_BufferSourceEndpointId(IPC_Buffer Buffer)
{
	IPC_Buffer_T *BufferPtr = IPC_BufferToPtr(Buffer);

	if (BufferPtr == 0) {
		IPC_TRACE(IPC_Channel_Error, "IPC_BufferSourceEndpoint",
			  "Invalid Buffer %08X", Buffer, 0, 0, 0);
		return IPC_EP_None;
	}

	return IPC_PoolSourceEndpointId(BufferPtr->Pool);
}