From: John Hodge Date: Sun, 9 Feb 2014 01:57:18 +0000 (+0800) Subject: UDI/channels - Tracing of direction of calls X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=e4978500b375ec6d919beacec14b3f132811b51c;p=tpg%2Facess2.git UDI/channels - Tracing of direction of calls --- diff --git a/KernelLand/Modules/Interfaces/UDI/channels.c b/KernelLand/Modules/Interfaces/UDI/channels.c index b3865077..a3894bb7 100644 --- a/KernelLand/Modules/Interfaces/UDI/channels.c +++ b/KernelLand/Modules/Interfaces/UDI/channels.c @@ -15,6 +15,11 @@ * TODO: This should actually lock the GCB, not the channel */ #define LOCK_CHANNELS 0 +/* + * TRACE_ENDPOINTS + * - Emit a log message with names/indexes of both endpoints + */ +#define TRACE_ENDPOINTS 1 #define MAX_SPAWN_IDX 6 @@ -195,6 +200,13 @@ const void *UDI_int_ChannelPrepForCall(udi_cb_t *gcb, tUDI_MetaLang *metalang, u } } + #if TRACE_ENDPOINTS + struct sUDI_ChannelSide *thisside = UDI_int_ChannelGetSide(gcb->channel, false); + Log("%s:%i -> %s:%i", + (thisside->Instance ? thisside->Instance->Module->ModuleName : "MA"), thisside->RegionIdx, + (newside->Instance ? newside->Instance->Module->ModuleName : "MA"), newside->RegionIdx); + #endif + gcb->channel = (udi_channel_t)&newside->BackPtr; gcb->context = newside->Context; if( !newside->Ops ) {