WIP: Move LowLevelMonitor functions from CoreRT to System.Native#35060
WIP: Move LowLevelMonitor functions from CoreRT to System.Native#35060filipnavara wants to merge 3 commits into
Conversation
Let's only add them when we know we need them. Thanks. |
|
What's going to use all of this? Something that's going to be added to corefx? If so, can we add the things using them at the same time? |
Ok, removed them.
CoreRT implementation of Based on this guidance: dotnet/corert#6880 (comment) |
|
I started removing the CoreRT native functions in System.Private.CoreLib.Native that were already moved or independently implemented in System.Native (dotnet/corert#6932, #35031).
It may be time to rethink whether to keep |
I am very uneasy about adding things to a repository that are not directly used + tested by the CI. In this case I am not sure how to accomplish that. I am not going to drop the "WIP" tag until I either find a way to do that or submit the counter-part CoreRT code that is locally tested. |
The other option is to absorb some of |
|
If you think the removal of |
|
Closing for now. I will reopen it once I asses all the dependencies of the CoreRT thread pool code and come up with a plan to resolve them. |
The functions are renamed, implementation is converted from C++ to C.
Original source:
Two new functions are exposed -SystemNative_MonitorTryAcquireandSystemNative_MonitorBroadcastAndRelease. Both were implemented in CoreRT native code, but they were never used. They will likely not be necessary, but I added them in the off-chance that they would be used since the implementation is small and trivial.The need forSystemNative_MonitorTryAcquireis avoided by keeping the track of locked state in the managed code and usingInterlockedmethods to handle it there.SystemNative_MonitorBroadcastAndReleaseis similar toMonitor.PulseAll, which is not exposed in theLowLevelMonitorAPI.Naming is not necessarily final, suggestions are welcome.