2005-07-06 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / threads-types.h
index 68baf300f43feaabacb3ff245da8d7f8edc78e65..c43c658516452f90700dc26c4f4a8d0d80141a68 100644 (file)
 
 #include <mono/io-layer/io-layer.h>
 
-struct _MonoThreadsSync
-{
-       guint32 owner;                  /* thread ID */
-       guint32 nest;
-       volatile guint32 entry_count;
-       HANDLE entry_sem;
-       GSList *wait_list;
-};
-
 /* This is a copy of System.Threading.ThreadState */
 typedef enum {
        ThreadState_Running = 0x00000000,
@@ -44,7 +35,6 @@ typedef enum {
 
 extern HANDLE ves_icall_System_Threading_Thread_Thread_internal(MonoThread *this_obj, MonoObject *start);
 extern void ves_icall_System_Threading_Thread_Thread_free_internal(MonoThread *this_obj, HANDLE thread);
-extern void ves_icall_System_Threading_Thread_Start_internal(MonoThread *this_obj, HANDLE thread);
 extern void ves_icall_System_Threading_Thread_Sleep_internal(int ms);
 extern gboolean ves_icall_System_Threading_Thread_Join_internal(MonoThread *this_obj, int ms, HANDLE thread);
 extern gint32 ves_icall_System_Threading_Thread_GetDomainID (void);
@@ -58,8 +48,6 @@ extern MonoObject* ves_icall_System_Threading_Thread_GetCachedCurrentUICulture (
 extern MonoArray* ves_icall_System_Threading_Thread_GetSerializedCurrentUICulture (MonoThread *this_obj);
 extern void ves_icall_System_Threading_Thread_SetCachedCurrentUICulture (MonoThread *this_obj, MonoObject *culture);
 void ves_icall_System_Threading_Thread_SetSerializedCurrentUICulture (MonoThread *this_obj, MonoArray *arr);
-extern void ves_icall_System_Threading_Thread_SlotHash_store(MonoObject *data);
-extern MonoObject *ves_icall_System_Threading_Thread_SlotHash_lookup(void);
 extern HANDLE ves_icall_System_Threading_Mutex_CreateMutex_internal(MonoBoolean owned, MonoString *name, MonoBoolean *created);
 extern void ves_icall_System_Threading_Mutex_ReleaseMutex_internal (HANDLE handle );
 extern HANDLE ves_icall_System_Threading_Events_CreateEvent_internal (MonoBoolean manual, MonoBoolean initial, MonoString *name);
@@ -76,17 +64,35 @@ extern gint64 ves_icall_System_Threading_Interlocked_Increment_Long(gint64 *loca
 extern gint32 ves_icall_System_Threading_Interlocked_Decrement_Int(gint32 *location);
 extern gint64 ves_icall_System_Threading_Interlocked_Decrement_Long(gint64 * location);
 
-extern gint32 ves_icall_System_Threading_Interlocked_Exchange_Int(gint32 *location1, gint32 value);
-extern MonoObject *ves_icall_System_Threading_Interlocked_Exchange_Object(MonoObject **location1, MonoObject *value);
-extern gfloat ves_icall_System_Threading_Interlocked_Exchange_Single(gfloat *location1, gfloat value);
+extern gint32 ves_icall_System_Threading_Interlocked_Exchange_Int(gint32 *location, gint32 value);
+extern gint64 ves_icall_System_Threading_Interlocked_Exchange_Long(gint64 *location, gint64 value);
+extern MonoObject *ves_icall_System_Threading_Interlocked_Exchange_Object(MonoObject **location, MonoObject *value);
+extern gfloat ves_icall_System_Threading_Interlocked_Exchange_Single(gfloat *location, gfloat value);
+extern gdouble ves_icall_System_Threading_Interlocked_Exchange_Double(gdouble *location, gdouble value);
+
+extern gint32 ves_icall_System_Threading_Interlocked_CompareExchange_Int(gint32 *location, gint32 value, gint32 comparand);
+extern gint64 ves_icall_System_Threading_Interlocked_CompareExchange_Long(gint64 *location, gint64 value, gint64 comparand);
+extern MonoObject *ves_icall_System_Threading_Interlocked_CompareExchange_Object(MonoObject **location, MonoObject *value, MonoObject *comparand);
+extern gfloat ves_icall_System_Threading_Interlocked_CompareExchange_Single(gfloat *location, gfloat value, gfloat comparand);
+extern gdouble ves_icall_System_Threading_Interlocked_CompareExchange_Double(gdouble *location, gdouble value, gdouble comparand);
+
+extern gint32 ves_icall_System_Threading_Interlocked_Add_Int(gint32 *location, gint32 value);
+extern gint64 ves_icall_System_Threading_Interlocked_Add_Long(gint64 *location, gint64 value);
+extern gint64 ves_icall_System_Threading_Interlocked_Read_Long(gint64 *location);
+
+extern gint32 ves_icall_System_Threading_Interlocked_Increment_Int(gint32 *location);
+extern gint64 ves_icall_System_Threading_Interlocked_Increment_Long(gint64 *location);
+
+extern gint32 ves_icall_System_Threading_Interlocked_Decrement_Int(gint32 *location);
+extern gint64 ves_icall_System_Threading_Interlocked_Decrement_Long(gint64 * location);
 
-extern gint32 ves_icall_System_Threading_Interlocked_CompareExchange_Int(gint32 *location1, gint32 value, gint32 comparand);
-extern MonoObject *ves_icall_System_Threading_Interlocked_CompareExchange_Object(MonoObject **location1, MonoObject *value, MonoObject *comparand);
-extern gfloat ves_icall_System_Threading_Interlocked_CompareExchange_Single(gfloat *location1, gfloat value, gfloat comparand);
 extern void ves_icall_System_Threading_Thread_Abort (MonoThread *thread, MonoObject *state);
 extern void ves_icall_System_Threading_Thread_ResetAbort (void);
 extern void ves_icall_System_Threading_Thread_Suspend (MonoThread *thread);
 extern void ves_icall_System_Threading_Thread_Resume (MonoThread *thread);
+extern void ves_icall_System_Threading_Thread_ClrState (MonoThread *thread, guint32 state);
+extern void ves_icall_System_Threading_Thread_SetState (MonoThread *thread, guint32 state);
+extern guint32 ves_icall_System_Threading_Thread_GetState (MonoThread *thread);
 
 gint8 ves_icall_System_Threading_Thread_VolatileRead1 (void *ptr);
 gint16 ves_icall_System_Threading_Thread_VolatileRead2 (void *ptr);