View | Details | Raw Unified | Return to bug 337383
Collapse All | Expand All

(-)metadata/threads.c (+10 lines)
Lines 638-643 Link Here
638
	thread->synch_cs = g_new0 (CRITICAL_SECTION, 1);
638
	thread->synch_cs = g_new0 (CRITICAL_SECTION, 1);
639
	InitializeCriticalSection (thread->synch_cs);
639
	InitializeCriticalSection (thread->synch_cs);
640
						  
640
						  
641
	//g_print("init1 done for %p (%p)\n", thread, thread->synch_cs);
642
641
	handle_store(thread);
643
	handle_store(thread);
642
644
643
	ResumeThread (thread_handle);
645
	ResumeThread (thread_handle);
Lines 888-895 Link Here
888
890
889
	CloseHandle (thread);
891
	CloseHandle (thread);
890
892
893
	//g_print("delete1 for %p (%p)\n", this, this->synch_cs);
894
891
	DeleteCriticalSection (this->synch_cs);
895
	DeleteCriticalSection (this->synch_cs);
892
	g_free (this->synch_cs);
896
	g_free (this->synch_cs);
897
	this->synch_cs = NULL;
893
}
898
}
894
899
895
static void mono_thread_start (MonoThread *thread)
900
static void mono_thread_start (MonoThread *thread)
Lines 3342-3347 Link Here
3342
void
3347
void
3343
mono_thread_set_state (MonoThread *thread, MonoThreadState state)
3348
mono_thread_set_state (MonoThread *thread, MonoThreadState state)
3344
{
3349
{
3350
	//g_print("setting state for %p (%p)\n", thread, thread->synch_cs);
3351
3352
	if (!thread->synch_cs)
3353
		return;
3354
3345
	EnterCriticalSection (thread->synch_cs);
3355
	EnterCriticalSection (thread->synch_cs);
3346
	thread->state |= state;
3356
	thread->state |= state;
3347
	LeaveCriticalSection (thread->synch_cs);
3357
	LeaveCriticalSection (thread->synch_cs);

Return to bug 337383