[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/image member.c,1.22,1.23
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/image member.c,1.22,1.23 |
Date: |
Fri, 18 Apr 2003 05:15:55 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/image
In directory subversions:/tmp/cvs-serv6025/image
Modified Files:
member.c
Log Message:
add support for thread-static fields to the runtime engine.
Index: member.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/member.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** member.c 14 Feb 2003 00:48:46 -0000 1.22
--- member.c 18 Apr 2003 09:15:53 -0000 1.23
***************
*** 1091,1094 ****
--- 1091,1122 ----
}
+ int ILFieldIsThreadStatic(ILField *field)
+ {
+ ILAttribute *attr;
+ ILMethod *ctor;
+ ILClass *classInfo;
+ if(!field || !ILField_IsStatic(field))
+ {
+ return 0;
+ }
+ attr = 0;
+ while((attr = ILProgramItemNextAttribute
+ (ILToProgramItem(field), attr)) != 0)
+ {
+ ctor = ILProgramItemToMethod(ILAttributeTypeAsItem(attr));
+ if(ctor)
+ {
+ classInfo = ILMethod_Owner(ctor);
+ if(!strcmp(ILClass_Name(classInfo),
"ThreadStaticAttribute") &&
+ ILClass_Namespace(classInfo) != 0 &&
+ !strcmp(ILClass_Namespace(classInfo), "System"))
+ {
+ return 1;
+ }
+ }
+ }
+ return 0;
+ }
+
ILEvent *ILEventCreate(ILClass *info, ILToken token,
const char *name, ILUInt32
attributes,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/image member.c,1.22,1.23,
Rhys Weatherley <address@hidden> <=