[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine engine.h,1.79,1.80 lib_thread.c,
From: |
Thong Nguyen <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine engine.h,1.79,1.80 lib_thread.c,1.15,1.16 process.c,1.49,1.50 thread.c,1.18,1.19 |
Date: |
Sat, 05 Jul 2003 20:41:19 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv17627/engine
Modified Files:
engine.h lib_thread.c process.c thread.c
Log Message:
More threading improvements.
Index: engine.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/engine.h,v
retrieving revision 1.79
retrieving revision 1.80
diff -C2 -r1.79 -r1.80
*** engine.h 5 Jul 2003 22:51:32 -0000 1.79
--- engine.h 6 Jul 2003 00:41:16 -0000 1.80
***************
*** 360,363 ****
--- 360,368 ----
/*
+ * Destroy an engine level thread.
+ */
+ void _ILExecThreadDestroy(ILExecThread *thread);
+
+ /*
* Lay out a class's fields, virtual methods, and interfaces.
* Returns zero if there is something wrong with the definition.
Index: lib_thread.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_thread.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** lib_thread.c 5 Jul 2003 22:51:32 -0000 1.15
--- lib_thread.c 6 Jul 2003 00:41:16 -0000 1.16
***************
*** 840,844 ****
}
! ILExecThreadDestroy(thread);
}
--- 840,844 ----
}
! ILThreadUnregisterForManagedExecution(thread->supportThread);
}
***************
*** 896,900 ****
if (supportThread)
{
! ILThreadDestroy(supportThread);
}
}
--- 896,902 ----
if (supportThread)
{
! ((System_Thread *)_this)->privateData = 0;
!
! ILThreadDestroy(supportThread);
}
}
***************
*** 1089,1094 ****
((System_Thread *)_this)->privateData = 0;
ILThreadDestroy(supportThread);
- ILExecThreadDestroy(execThread);
/* Throw an OutOfMemoryException */
--- 1091,1096 ----
((System_Thread *)_this)->privateData = 0;
+ ILThreadUnregisterForManagedExecution(supportThread);
ILThreadDestroy(supportThread);
/* Throw an OutOfMemoryException */
Index: process.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/process.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** process.c 5 Jul 2003 22:51:32 -0000 1.49
--- process.c 6 Jul 2003 00:41:16 -0000 1.50
***************
*** 154,163 ****
ILGCDeinit();
! /* Destroy the threads associated with the process */
! while(process->firstThread != 0)
{
! ILExecThreadDestroy(process->firstThread);
}
!
/* Destroy the CVM coder instance */
ILCoderDestroy(process->coder);
--- 154,163 ----
ILGCDeinit();
! /* Wait for all foreground threads to finish */
! if (process->firstThread != 0)
{
! ILThreadWaitForForegroundThreads(-1);
}
!
/* Destroy the CVM coder instance */
ILCoderDestroy(process->coder);
Index: thread.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/thread.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** thread.c 5 Jul 2003 22:51:32 -0000 1.18
--- thread.c 6 Jul 2003 00:41:16 -0000 1.19
***************
*** 50,54 ****
classInfo = ILExecThreadLookupClass(thread,
"System.Threading.Thread");
! /* Allocate the CLR thread object */
clrThread = _ILEngineAllocObject(thread, classInfo);
--- 50,54 ----
classInfo = ILExecThreadLookupClass(thread,
"System.Threading.Thread");
! /* Allocate a new CLR thread object */
clrThread = _ILEngineAllocObject(thread, classInfo);
***************
*** 88,91 ****
--- 88,103 ----
}
+ /*
+ * Unregisters a thread for managed execution.
+ */
+ ILExecThread *ILThreadUnregisterForManagedExecution(ILThread *thread)
+ {
+ ILExecThread *execThread;
+
+ execThread = ILThreadGetObject(thread);
+
+ _ILExecThreadDestroy(execThread);
+ }
+
ILExecThread *_ILExecThreadCreate(ILExecProcess *process)
{
***************
*** 150,154 ****
}
! void ILExecThreadDestroy(ILExecThread *thread)
{
ILExecMonitor *monitor, *next;
--- 162,166 ----
}
! void _ILExecThreadDestroy(ILExecThread *thread)
{
ILExecMonitor *monitor, *next;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine engine.h,1.79,1.80 lib_thread.c,1.15,1.16 process.c,1.49,1.50 thread.c,1.18,1.19,
Thong Nguyen <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet/include il_engine.h,1.39,1.40 il_thread.h,1.12,1.13
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/support hb_gc.c,1.16,1.17 thread.c,1.8,1.9
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet/include il_engine.h,1.39,1.40 il_thread.h,1.12,1.13
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/support hb_gc.c,1.16,1.17 thread.c,1.8,1.9
- Index(es):