fix some calloc bug

1. some calloc fix
2. fix some document error
3. refactor kv API, to be compatible with ota API
This commit is contained in:
daishengdong
2020-04-24 11:58:42 +08:00
parent f6527d2d9a
commit 2e8c8c19e6
19 changed files with 77 additions and 93 deletions

View File

@@ -18,18 +18,18 @@ platform_thread_t *platform_thread_init( const char *name,
platform_thread_t *thread;
k_err_t err;
k_stack_t *thread_stack;
thread = platform_memory_alloc(sizeof(platform_thread_t));
thread = platform_memory_calloc(1, sizeof(platform_thread_t));
thread_stack = (k_stack_t*) platform_memory_alloc(stack_size);
err = tos_task_create(&(thread->thread),
(char*)name,
err = tos_task_create(&(thread->thread),
(char*)name,
entry,
param,
priority,
param,
priority,
thread_stack,
stack_size,
tick);
if(err != K_ERR_NONE) {
platform_memory_free(thread);
platform_memory_free(thread_stack);