-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move System.Threading.Event/Mutex/Semaphore support to managed code #44795
Comments
Related: mono/mono#8237 |
Could they be rewritten into something else or use C# module initializers instead? |
It is because of the synchronization of static constructors depends on WaitSubsystem in CoreRT. I do not expect that you will have nor want to introduce this dependency in Mono. It should be fine to just put use of this attribute under |
Draft until I see how this behaves on CI. Fixes dotnet/runtime#44795 A few notes: I've attempted to nullable annotate the relevant files but would appreciate someone else checking over my work, since the design does not really lend itself to that. I can split the time-related parts of the System.Native addition off into a separate header if desired, but since they wouldn't be used elsewhere I just put the relevant includes in the C file. This can fairly easily be moved to shared if desired, but I've put it in Mono only for now. Given there's a chance we might want to share it eventually after testing in Mono, I've left a CORERT define. The `TARGET_UNIX` define usage isn't ideal, but given we care about the layout for that particular class it seemed like the easiest option. If it's a problem please let me know.
Depends on dotnet/runtime#47325 and dotnet/runtime#47327, draft until they're in and I rebase this. Fixes dotnet/runtime#44795 Best reviewed commit by commit—the commits starting with "Remote appropriate icalls from Mono" are new. In some cases, I've left comments in the commit description. I expect the most interesting commits to be the last few, in particular the annotations.
Tagging subscribers to 'size-reduction': @eerhardt, @SamMonoRT, @marek-safar, @tannergooding, @CoffeeFlux Issue DetailsThese synchronization classes have little to do with the runtime and they can be implemented mostly in managed code as done in corert.
|
These synchronization classes have little to do with the runtime and they can be implemented mostly in managed code as done in corert.
The text was updated successfully, but these errors were encountered: