/** Make sure that if the specified function is a dynamically loaded function, it has been fully loaded. */ static int load( const wcstring &name ) { ASSERT_IS_MAIN_THREAD(); scoped_lock lock(functions_lock); bool was_autoload = is_autoload; int res; function_map_t::iterator iter = loaded_functions.find(name); if( iter != loaded_functions.end() && !iter->second.is_autoload ) { /* We have a non-autoload version already */ return 0; } is_autoload = true; res = function_autoloader.load( name, true ); is_autoload = was_autoload; return res; }
/// Make sure that if the specified function is a dynamically loaded function, it has been fully /// loaded. static int load(const wcstring &name) { ASSERT_IS_MAIN_THREAD(); scoped_lock locker(functions_lock); bool was_autoload = is_autoload; int res; bool no_more_autoload = function_tombstones.count(name) > 0; if (no_more_autoload) return 0; function_map_t::iterator iter = loaded_functions.find(name); if (iter != loaded_functions.end() && !iter->second.is_autoload) { // We have a non-autoload version already. return 0; } is_autoload = true; res = function_autoloader.load(name, true); is_autoload = was_autoload; return res; }