You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In various places, the VM introduces #define Sleep(a) Dont_Use_Sleep(a). These are troublesome for the GC which has to introduce a workaround.
Per @jkotas "this hack made sense for full .NET Framework. It is not really valuable for CoreCLR. I would rather delete all the code to #define Sleep to prevent people from using it."
My tip has these #define for Sleep in headers...
src/gc/gc.h:// This is a funny workaround for the fact that "common.h" defines Sleep to be
src/gc/gc.h:// However, GCToOSInterface defines a function called Sleep, which (due to this define) becomes
src/inc/clrhost.h:#define Sleep(dwMilliseconds) \
src/vm/comsynchronizable.h:#define Sleep(a) Dont_Use_Sleep(a)
src/vm/ecalllist.h:#define Sleep(a) Dont_Use_Sleep(a)
Activity
mangod9 commentedon Sep 22, 2020
@sdmaclea this appears to be fixed, or is this still a concern?
sdmaclea commentedon Sep 22, 2020
Looks like it is still a concern.
mangod9 commentedon Sep 22, 2020
I meant I didnt see the workaround you mention in
gc.h. Perhaps it should be moved to vm area then?sdmaclea commentedon Sep 22, 2020
Done