[local gc] refactor apis for threading and suspension to avoid redundant calls in...
authorDavid Mason <davmason@microsoft.com>
Tue, 13 Mar 2018 08:24:20 +0000 (01:24 -0700)
committerGitHub <noreply@github.com>
Tue, 13 Mar 2018 08:24:20 +0000 (01:24 -0700)
commit8edb3ef2529cc0beb0c034482fdb32fa4c95c606
tree369d8ecf4ca45f42341fc50b750ca7fe13086834
parent0c4344f5a999d817b431b9e3934600ccb97d0e4b
[local gc] refactor apis for threading and suspension to avoid redundant calls in to the runtime (#16765)

* [Local GC] Refactor calls involving thread modes, suspension, and alloc contexts to always operate on current thread

* BOOL -> bool for enable/disable preemptive routines, also remove an unused call to GetThread

* avoid one indirection by having GCToEEInterface::EnablePreemptiveGC return a bool indicating whether the mode was changed

* Callback on IGCHeap for the runtime to notify the GC when it is trapping threads

* use g_fSuspensionPending instead of GCToEEInterface::CatchAtSafePoint for allow_fgc

* Remove CatchAtSafePoint

* Remove GetThread from WaitLongerNoInstru

* code review feedback

* code review feedback

* change BOOL to bool
15 files changed:
src/gc/env/gcenv.ee.h
src/gc/gc.cpp
src/gc/gc.h
src/gc/gccommon.cpp
src/gc/gcee.cpp
src/gc/gcenv.ee.standalone.inl
src/gc/gcimpl.h
src/gc/gcinterface.ee.h
src/gc/gcinterface.h
src/gc/gcpriv.h
src/gc/sample/gcenv.ee.cpp
src/gc/sample/gcenv.h
src/vm/gcenv.ee.cpp
src/vm/gcenv.ee.h
src/vm/threadsuspend.cpp