2 * threads-dummy.c: System-specific thread support dummy routines
5 * Dick Porter (dick@ximian.com)
7 * (C) 2001 Ximian, Inc.
13 #include <mono/metadata/object.h>
14 #include <mono/metadata/threads.h>
16 static MonoObject *main_thread;
18 guint32 ves_icall_System_Threading_Thread_Thread_internal(MonoObject *this,
24 void ves_icall_System_Threading_Thread_Start_internal(MonoObject *this,
30 gint32 ves_icall_System_Threading_Thread_Sleep_internal(gint32 ms)
35 void ves_icall_System_Threading_Thread_Schedule_internal(void)
39 MonoObject *ves_icall_System_Threading_Thread_CurrentThread_internal(void)
44 gboolean ves_icall_System_Threading_Thread_Join_internal(MonoObject *this,
50 void ves_icall_System_Threading_Thread_DataSlot_register(MonoObject *slot)
54 void ves_icall_System_Threading_Thread_DataSlot_store(MonoObject *slot,
59 MonoObject *ves_icall_System_Threading_Thread_DataSlot_retrieve(MonoObject *slot)
64 void ves_icall_System_LocalDataStoreSlot_DataSlot_unregister(MonoObject *this)
68 void ves_icall_System_Threading_Monitor_Monitor_enter(MonoObject *obj)
72 void ves_icall_System_Threading_Monitor_Monitor_exit(MonoObject *obj)
76 gboolean ves_icall_System_Threading_Monitor_Monitor_test_owner(MonoObject *obj)
81 gboolean ves_icall_System_Threading_Monitor_Monitor_test_synchronised(MonoObject *obj)
86 void ves_icall_System_Threading_Monitor_Monitor_pulse(MonoObject *obj)
90 void ves_icall_System_Threading_Monitor_Monitor_pulse_all(MonoObject *obj)
94 gboolean ves_icall_System_Threading_Monitor_Monitor_try_enter(MonoObject *obj, int ms)
99 gboolean ves_icall_System_Threading_Monitor_Monitor_wait(MonoObject *obj, int ms)
104 void mono_thread_init(void)
106 MonoClass *thread_class;
108 /* Build a System.Threading.Thread object instance to return
109 * for the main line's Thread.CurrentThread property.
111 thread_class=mono_class_from_name(mono_defaults.corlib, "System.Threading", "Thread");
113 /* I wonder what happens if someone tries to destroy this
114 * object? In theory, I guess the whole program should act as
115 * though exit() were called :-)
117 main_thread=mono_object_new(thread_class);
121 void mono_thread_cleanup(void)