/* src/vm/initialize.cpp - static class initializer functions
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2005, 2006, 2007, 2008, 2009
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
/* if return value is not NULL everything was ok and the class is
initialized */
- if (r)
- c->state |= CLASS_INITIALIZED;
+ if (r) {
+ // Let's make sure that everything is flushed out to memory before
+ // marking the class as initialized.
+ Atomic::write_memory_barrier();
+
+ c->state |= CLASS_INITIALIZED;
+ }
/* this initalizing run is done */
* Emacs will automagically detect them.
* ---------------------------------------------------------------------
* Local variables:
- * mode: c
+ * mode: c++
* indent-tabs-mode: t
* c-basic-offset: 4
* tab-width: 4
-/* src/vm/linker.c - class linker functions
+/* src/vm/linker.cpp - class linker functions
Copyright (C) 1996-2005, 2006, 2007, 2008
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
* Emacs will automagically detect them.
* ---------------------------------------------------------------------
* Local variables:
- * mode: c
+ * mode: c++
* indent-tabs-mode: t
* c-basic-offset: 4
* tab-width: 4