< prev index next >

src/hotspot/share/runtime/deoptimization.cpp

Print this page

        

*** 867,877 **** } public: static BoxCache<PrimitiveType, CacheType, BoxType>* singleton(Thread* thread) { if (_singleton == NULL) { BoxCache<PrimitiveType, CacheType, BoxType>* s = new BoxCache<PrimitiveType, CacheType, BoxType>(thread); ! if (!Atomic::replace_if_null(s, &_singleton)) { delete s; } } return _singleton; } --- 867,877 ---- } public: static BoxCache<PrimitiveType, CacheType, BoxType>* singleton(Thread* thread) { if (_singleton == NULL) { BoxCache<PrimitiveType, CacheType, BoxType>* s = new BoxCache<PrimitiveType, CacheType, BoxType>(thread); ! if (!Atomic::replace_if_null(&_singleton, s)) { delete s; } } return _singleton; }
*** 921,931 **** } public: static BooleanBoxCache* singleton(Thread* thread) { if (_singleton == NULL) { BooleanBoxCache* s = new BooleanBoxCache(thread); ! if (!Atomic::replace_if_null(s, &_singleton)) { delete s; } } return _singleton; } --- 921,931 ---- } public: static BooleanBoxCache* singleton(Thread* thread) { if (_singleton == NULL) { BooleanBoxCache* s = new BooleanBoxCache(thread); ! if (!Atomic::replace_if_null(&_singleton, s)) { delete s; } } return _singleton; }
< prev index next >