mirror of
				https://github.com/bytecodealliance/wasm-micro-runtime.git
				synced 2025-10-31 13:17:31 +00:00 
			
		
		
		
	Enhance app manager (#1011)
Add app_manager_is_started API per requested by #1004 to support checking the status of app manager in another thread.
This commit is contained in:
		
							parent
							
								
									3fe191b0df
								
							
						
					
					
						commit
						9fc124b06f
					
				|  | @ -13,6 +13,7 @@ | |||
| 
 | ||||
| /* Queue of app manager */ | ||||
| static bh_queue *g_app_mgr_queue; | ||||
| static bool g_app_mgr_started; | ||||
| 
 | ||||
| void * | ||||
| get_app_manager_queue() | ||||
|  | @ -381,9 +382,13 @@ app_manager_startup(host_interface *interface) | |||
| 
 | ||||
|     app_manager_printf("App Manager started.\n"); | ||||
| 
 | ||||
|     g_app_mgr_started = true; | ||||
| 
 | ||||
|     /* Enter loop run */ | ||||
|     bh_queue_enter_loop_run(g_app_mgr_queue, app_manager_queue_callback, NULL); | ||||
| 
 | ||||
|     g_app_mgr_started = false; | ||||
| 
 | ||||
|     /* Destroy registered resources */ | ||||
|     am_cleanup_registeration(ID_APP_MGR); | ||||
| 
 | ||||
|  | @ -397,6 +402,12 @@ fail1: | |||
|     bh_queue_destroy(g_app_mgr_queue); | ||||
| } | ||||
| 
 | ||||
| bool | ||||
| app_manager_is_started(void) | ||||
| { | ||||
|     return g_app_mgr_started; | ||||
| } | ||||
| 
 | ||||
| #include "module_config.h" | ||||
| 
 | ||||
| module_interface *g_module_interfaces[Module_Max] = { | ||||
|  |  | |||
|  | @ -183,6 +183,10 @@ app_manager_host_init(host_interface *intf); | |||
| void | ||||
| app_manager_startup(host_interface *intf); | ||||
| 
 | ||||
| /* Return whether app manager is started */ | ||||
| bool | ||||
| app_manager_is_started(void); | ||||
| 
 | ||||
| /* Get queue of current applet */ | ||||
| void * | ||||
| app_manager_get_module_queue(uint32 module_type, void *module_inst); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Wenyong Huang
						Wenyong Huang