rem: recursive_lock_lock(&modules_lock);
context: get_module(const char *path, module_info **vec){	module *m;	loaded_module *lm;	int res = B_NO_ERROR;	*vec = NULL;		dprintf("*** get_module: %s\n", path);		m = (module *)hash_get(modules_list, path, strlen(path));		/* If m == NULL we didn't find any record of the module 	 * in our hash. We'll now call serach_mdoules which will do	 * scan of the possible directories that may contain it.	 */	if (!m) {		m = search_module(path);		if (!m) {			dprintf("Search for %s failed.\n", path);			return ENOENT;		}	}		/* If we've got here then we basically have a pointer to the	 * module structure representing the requested module in m;	 */		recursive_lock_lock(&modules_lock);	/* We now need to find the module_file structure. This should	 * be in memory if we have just run search_modules, but may not be	 * if we are used cached information.	 */	lm = (loaded_module*)hash_get(module_files, m->file, strlen(m->file));	if (!lm) {		if (load_module_file(m->file) == NULL)			return ENOENT;				lm = (loaded_module*)hash_get(module_files, m->file, strlen(m->file));		if (!lm)			return ENOENT;	}	/* We have the module file required in memory! */	m->ptr = lm->info[m->offset];	m->module = lm;	INC_MOD_REF_COUNT(m);	*vec = m->ptr;	/* The state will be adjusted by the call to init_module */	recursive_lock_unlock(&modules_lock);		if (res != B_NO_ERROR) {		vec = NULL;		return res;	}		/* Only run the init routine if we have ref_cnt == 1. This should	 * indicate that we have just been loaded.	 */	if (m->ref_cnt == 1)		res = init_module(m);	return res;}