1 /* 2 * Copyright 2010-2014, 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 BCatalog sCatalog; 14 static int32 sCatalogInitOnce = INIT_ONCE_UNINITIALIZED; 15 16 17 BCatalog* 18 BLocaleRoster::GetCatalog() 19 { 20 #if (__GNUC__ < 3) 21 asm volatile(".hidden GetCatalog__13BLocaleRoster"); 22 #else 23 asm volatile(".hidden _ZN13BLocaleRoster10GetCatalogEv"); 24 #endif 25 26 return _GetCatalog(&sCatalog, &sCatalogInitOnce); 27 } 28 29 30 namespace BPrivate{ 31 void ForceUnloadCatalog() 32 { 33 sCatalogInitOnce = INIT_ONCE_UNINITIALIZED; 34 } 35 } 36 37