Skip to content

Commit 02c0f70

Browse files
author
Josh Peterson
committed
"Implement" OSSpecificSynchronizationContext icalls.
1 parent 5379671 commit 02c0f70

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

mono/metadata/icall-def.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,10 @@ HANDLES(NATIVEC_3, "OpenEvent_icall", ves_icall_System_Threading_Events_OpenEven
10311031
NOHANDLES(ICALL(NATIVEC_4, "ResetEvent_internal", ves_icall_System_Threading_Events_ResetEvent_internal))
10321032
NOHANDLES(ICALL(NATIVEC_5, "SetEvent_internal", ves_icall_System_Threading_Events_SetEvent_internal))
10331033

1034+
ICALL_TYPE(OSSYNCCONTEXT, "System.Threading.OSSpecificSynchronizationContext", OSSYNCCONTEXT_1)
1035+
HANDLES(ICALL(OSSYNCCONTEXT_1, "GetOSContext", ves_icall_System_Threading_OSSpecificSynchronizationContext_GetOSContext))
1036+
ICALL(OSSYNCCONTEXT_2, "PostInternal", ves_icall_System_Threading_OSSpecificSynchronizationContext_PostInternal)
1037+
10341038
ICALL_TYPE(SEMA, "System.Threading.Semaphore", SEMA_1)
10351039
NOHANDLES(ICALL(SEMA_1, "CreateSemaphore_icall", ves_icall_System_Threading_Semaphore_CreateSemaphore_icall))
10361040
NOHANDLES(ICALL(SEMA_2, "OpenSemaphore_icall", ves_icall_System_Threading_Semaphore_OpenSemaphore_icall))

mono/metadata/icall.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9850,3 +9850,16 @@ ves_icall_System_Net_NetworkInformation_LinuxNetworkChange_CloseNLSocket (gpoint
98509850
#undef ICALL
98519851
#undef NOHANDLES
98529852
#undef MONO_HANDLE_REGISTER_ICALL
9853+
9854+
MonoObjectHandle
9855+
ves_icall_System_Threading_OSSpecificSynchronizationContext_GetOSContext ()
9856+
{
9857+
return NULL_HANDLE;
9858+
}
9859+
9860+
void
9861+
ves_icall_System_Threading_OSSpecificSynchronizationContext_PostInternal (gpointer callback, gpointer arg)
9862+
{
9863+
/* This isn't actually reachable since ves_icall_System_Threading_OSSpecificSynchronizationContext_GetOSContext always returns NULL */
9864+
mono_set_pending_exception (mono_get_exception_not_implemented ("System.Threading.InteropServices.OSSpecificSynchronizationContext.PostInternal internal call is not implemented."));
9865+
}

mono/metadata/threads-types.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,4 +597,10 @@ mono_interlocked_unlock(void) {
597597
}
598598
#endif
599599

600+
MonoObjectHandle
601+
ves_icall_System_Threading_OSSpecificSynchronizationContext_GetOSContext ();
602+
603+
void
604+
ves_icall_System_Threading_OSSpecificSynchronizationContext_PostInternal (gpointer callback, gpointer arg);
605+
600606
#endif /* _MONO_METADATA_THREADS_TYPES_H_ */

0 commit comments

Comments
 (0)