88 |
} |
} |
89 |
} |
} |
90 |
|
|
91 |
|
/* |
92 |
|
* This function is only used for initializing an ILThread |
93 |
|
* structure for threads not created by pnet. |
94 |
|
* This Thread MUST NOT BE USED to run managed code or create |
95 |
|
* managed objects because this thread is not controled by the GC. |
96 |
|
*/ |
97 |
|
void _ILThreadInitHandleSelf(ILThread *thread) |
98 |
|
{ |
99 |
|
/* Initialize the thread's handle and identifier. We have |
100 |
|
to duplicate the thread handle because "GetCurrentThread()" returns |
101 |
|
a pseudo-handle and not a real one. We need the real one */ |
102 |
|
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), |
103 |
|
GetCurrentProcess(), (HANDLE *)(&(thread->handle)), |
104 |
|
0, 0, DUPLICATE_SAME_ACCESS); |
105 |
|
thread->identifier = GetCurrentThreadId(); |
106 |
|
} |
107 |
|
|
108 |
void _ILThreadInitSystem(ILThread *mainThread) |
void _ILThreadInitSystem(ILThread *mainThread) |
109 |
{ |
{ |
110 |
/* Allocate a TLS key for storing thread objects */ |
/* Allocate a TLS key for storing thread objects */ |