1 /* 2 * Copyright 2010-2016, Adrien Destugues <pulkomandy@pulkomandy.tk>. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7 #include <Catalog.h> 8 #include <LocaleRoster.h> 9 10 #include <locks.h> 11 12 13 static int32 sCatalogInitOnce = INIT_ONCE_UNINITIALIZED; 14 15 16 BCatalog* 17 BLocaleRoster::GetCatalog() 18 { 19 static BCatalog sCatalog; 20 21 #if (__GNUC__ < 3) 22 asm volatile(".hidden GetCatalog__13BLocaleRoster"); 23 #else 24 asm volatile(".hidden _ZN13BLocaleRoster10GetCatalogEv"); 25 #endif 26 27 return _GetCatalog(&sCatalog, &sCatalogInitOnce); 28 } 29 30 31 namespace BPrivate{ 32 void ForceUnloadCatalog() 33 { 34 sCatalogInitOnce = INIT_ONCE_UNINITIALIZED; 35 } 36 } 37 38