From b68d96aec286ca21a4f4f5af298608e8b40fc142 Mon Sep 17 00:00:00 2001 From: Pantazis Deligiannis Date: Mon, 30 Jan 2023 22:24:17 -0800 Subject: [PATCH] edit --- Source/Core/Runtime/Operations/Operation.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/Core/Runtime/Operations/Operation.cs b/Source/Core/Runtime/Operations/Operation.cs index 1fa0c950..6cf422ec 100644 --- a/Source/Core/Runtime/Operations/Operation.cs +++ b/Source/Core/Runtime/Operations/Operation.cs @@ -201,5 +201,18 @@ namespace Microsoft.Coyote.Runtime return false; } + + /// + /// Registers the method invoked by the currently executing operation. + /// + public static void RegisterCallSite(string method) + { + var runtime = CoyoteRuntime.Current; + if (runtime.SchedulingPolicy != SchedulingPolicy.None && + runtime.TryGetExecutingOperation(out ControlledOperation current)) + { + current.LastCallSite = method; + } + } } }