From 13812bfd0f6eda442c944f416e8c871b18d99e3f Mon Sep 17 00:00:00 2001 From: Sean Gillespie Date: Fri, 14 Apr 2017 09:51:10 -0700 Subject: [Local GC] Move operations on CLREventStatic to the EE interface (#10813) * [Local GC] Move operations on CLREventStatic to the EE and add their functionality to the interface * Fix a missed case * Split GetWaitForGCEvent into two smaller interface methods to avoid exposing the event itself on the interface * Initial implementation for Unix * Complete unix implementation * Make it work on Windows * Remove redudant methods from GCToEEInterface * Fix the Linux build * First part of code review feedback: make GCEvent dispatch statically (Windows) * Second part of code review feedback: make GCEvent dispatch statically (Unix) * Standardize implementation across Windows/Unix (apparently MSVC is more lenient about constructor names than clang) * Address code review feedback: Add Create*Event methods back onto GCEvent and remove them from GCToOSInterface * Address code review feedback: remove a dead define * Remove a bad comment, remove an unnecessary friend class, fix some formatting issues * Fix an issue when initializing a GCEvent on Linux (should not be allocating an Impl in the constructor) * Fix the same issue on Windows (less bad, just leaks memory instead of asserting) --- src/gc/gcinterface.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gc/gcinterface.h') diff --git a/src/gc/gcinterface.h b/src/gc/gcinterface.h index cac2ba7114..4ebb5e15d7 100644 --- a/src/gc/gcinterface.h +++ b/src/gc/gcinterface.h @@ -687,9 +687,11 @@ public: // background GC as the BGC threads also need to walk LOH. virtual void PublishObject(uint8_t* obj) = 0; - // Gets the event that suspended threads will use to wait for the - // end of a GC. - virtual CLREventStatic* GetWaitForGCEvent() = 0; + // Signals the WaitForGCEvent event, indicating that a GC has completed. + virtual void SetWaitForGCEvent() = 0; + + // Resets the state of the WaitForGCEvent back to an unsignalled state. + virtual void ResetWaitForGCEvent() = 0; /* =========================================================================== -- cgit v1.2.3