Import app manager, samples and test-tools

This commit is contained in:
wenyongh
2019-05-17 17:15:25 +08:00
parent b6e29e2153
commit dd5b133fa5
164 changed files with 21123 additions and 496 deletions

View File

@ -15,7 +15,7 @@
*/
#include "runtime_sensor.h"
#include "app-manager-export.h"
#include "app_manager_export.h"
#include "module_wasm_app.h"
#include "bh_thread.h"
#include "bh_time.h"
@ -168,7 +168,7 @@ uint32 wasm_sensor_open(int32 name_offset, int instance)
memset(client, 0, sizeof(sensor_client_t));
client->client_id = mod_id;
client->client_callback = wasm_sensor_callback;
client->client_callback = (void *)wasm_sensor_callback;
client->interval = s->default_interval;
client->next = s->clients;
s->clients = client;

View File

@ -18,7 +18,7 @@
#define LIB_EXTENSION_RUNTIME_SENSOR_H_
#include "bh_platform.h"
#include "attr-container.h"
#include "attr_container.h"
struct _sys_sensor;
typedef struct _sys_sensor* sensor_obj_t;

View File

@ -18,9 +18,9 @@
#include "bh_queue.h"
#include "bh_thread.h"
#include "runtime_sensor.h"
#include "attr-container.h"
#include "attr_container.h"
#include "module_wasm_app.h"
#include "wasm-export.h"
#include "wasm_export.h"
/*
*
@ -99,11 +99,10 @@ static attr_container_t * read_test_sensor(void * sensor)
static bool config_test_sensor(void * s, void * config)
{
return false;
}
static void * thread_sensor_check(void * arg)
static void thread_sensor_check(void * arg)
{
while (1) {
int ms_to_expiry = check_sensor_timers();
@ -120,6 +119,8 @@ static void cb_wakeup_thread()
vm_cond_signal(&cond);
}
void set_sensor_reshceduler(void (*callback)());
void init_sensor_framework()
{
// init the mutext and conditions
@ -138,7 +139,7 @@ void init_sensor_framework()
wasm_register_cleanup_callback(sensor_cleanup_callback);
vm_thread_create(&tid, thread_sensor_check, NULL,
vm_thread_create(&tid, (void *)thread_sensor_check, NULL,
BH_APPLET_PRESERVED_STACK_SIZE);
}