From e4978500b375ec6d919beacec14b3f132811b51c Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 9 Feb 2014 09:57:18 +0800 Subject: [PATCH] UDI/channels - Tracing of direction of calls --- KernelLand/Modules/Interfaces/UDI/channels.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 ) { -- 2.20.1