X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=cacao.git;a=blobdiff_plain;f=src%2Fvm%2Fclass.cpp;h=8491efa889913e6c6a03544ffd777d02bd3b870c;hp=066bcfdcf4d220ef2401e4b321045c20b13ed4d4;hb=425c6f97a967a72e3b0cc2557be41f0ad1c26c34;hpb=248a83c9c3e0e7fbceda3f723e93dfcbbe67ee0b diff --git a/src/vm/class.cpp b/src/vm/class.cpp index 066bcfdcf..8491efa88 100644 --- a/src/vm/class.cpp +++ b/src/vm/class.cpp @@ -1,6 +1,6 @@ /* src/vm/class.cpp - class related functions - Copyright (C) 1996-2005, 2006, 2007, 2008, 2010 + Copyright (C) 1996-2011 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO This file is part of CACAO. @@ -2211,6 +2211,15 @@ int32_t class_get_modifiers(classinfo *c, bool ignoreInnerClassesAttrib) } +/** + * Helper function for the CLASS_IS_OR_ALMOST_INITIALIZED macro. + */ +bool class_initializing_thread_is_self(classinfo *c) +{ + threadobject *t = thread_get_current(); + return t == c->initializing_thread; +} + /* class_get_signature ********************************************************* Return the signature of the given class. For array and primitive