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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user