94 |
*/ |
*/ |
95 |
#define METADATA_WRLOCK(thread) \ |
#define METADATA_WRLOCK(thread) \ |
96 |
do { \ |
do { \ |
97 |
IL_METADATA_WRLOCK((thread)); \ |
IL_METADATA_WRLOCK(_ILExecThreadProcess(thread)); \ |
98 |
ILGCDisableFinalizers(0); \ |
ILGCDisableFinalizers(0); \ |
99 |
} while (0) |
} while (0) |
100 |
#define METADATA_UNLOCK(thread) \ |
#define METADATA_UNLOCK(thread) \ |
101 |
do { \ |
do { \ |
102 |
ILGCEnableFinalizers(); \ |
ILGCEnableFinalizers(); \ |
103 |
IL_METADATA_UNLOCK((thread)); \ |
IL_METADATA_UNLOCK(_ILExecThreadProcess(thread)); \ |
104 |
ILGCInvokeFinalizers(0); \ |
ILGCInvokeFinalizers(0); \ |
105 |
} while (0) |
} while (0) |
106 |
|
|
150 |
#endif |
#endif |
151 |
|
|
152 |
/* Make sure that we can lay out the method's class */ |
/* Make sure that we can lay out the method's class */ |
153 |
if(!_ILLayoutClass(ILMethod_Owner(method))) |
if(!_ILLayoutClass(_ILExecThreadProcess(thread), ILMethod_Owner(method))) |
154 |
{ |
{ |
155 |
METADATA_UNLOCK(thread); |
METADATA_UNLOCK(thread); |
156 |
*errorCode = IL_CONVERT_TYPE_INIT; |
*errorCode = IL_CONVERT_TYPE_INIT; |
312 |
if(fnInfo.func) |
if(fnInfo.func) |
313 |
{ |
{ |
314 |
/* Make the "cif" structure for the normal method entry */ |
/* Make the "cif" structure for the normal method entry */ |
315 |
cif = _ILMakeCifForMethod(method, (pinv == 0)); |
cif = _ILMakeCifForMethod(_ILExecThreadProcess(thread), |
316 |
|
method, (pinv == 0)); |
317 |
if(!cif) |
if(!cif) |
318 |
{ |
{ |
319 |
METADATA_UNLOCK(thread); |
METADATA_UNLOCK(thread); |
328 |
if(ctorfnInfo.func) |
if(ctorfnInfo.func) |
329 |
{ |
{ |
330 |
/* Make the "cif" structure for the allocating constructor */ |
/* Make the "cif" structure for the allocating constructor */ |
331 |
ctorcif = _ILMakeCifForConstructor(method, (pinv == 0)); |
ctorcif = _ILMakeCifForConstructor(_ILExecThreadProcess(thread), |
332 |
|
method, (pinv == 0)); |
333 |
if(!ctorcif) |
if(!ctorcif) |
334 |
{ |
{ |
335 |
METADATA_UNLOCK(thread); |
METADATA_UNLOCK(thread); |