format code

This commit is contained in:
lixianjing 2019-10-23 08:49:32 +08:00
parent 967259d761
commit 58e05345c6
3 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,8 @@
# 最新动态
* 2019/10/23
* 修改clone出来的edit的显示问题。
* 2019/10/19
* 完善主题切换功能。
* 增加文档[资源目录变更通知](assets_dir_changed.md)

View File

@ -30,11 +30,11 @@ struct _tk_cond_var_t {
tk_cond_var_t* tk_cond_var_create(void) {
tk_cond_var_t* cond_var = TKMEM_ZALLOC(tk_cond_var_t);
return_value_if_fail(cond_var != NULL, NULL);
if(tos_event_create(&(cond_var->event), 0) != K_ERR_NONE) {
if (tos_event_create(&(cond_var->event), 0) != K_ERR_NONE) {
TKMEM_FREE(cond_var);
}
return cond_var;
}
@ -43,7 +43,9 @@ ret_t tk_cond_var_wait(tk_cond_var_t* cond_var, uint32_t timeout_ms) {
k_event_flag_t flag_expect = 1;
k_opt_t opt = TOS_OPT_EVENT_PEND_ANY | TOS_OPT_EVENT_PEND_CLR;
return_value_if_fail(cond_var != NULL, RET_BAD_PARAMS);
return_value_if_fail(tos_event_pend(&(cond_var->event), flag_expect, &flag_match, timeout_ms, opt) == K_ERR_NONE, RET_FAIL);
return_value_if_fail(
tos_event_pend(&(cond_var->event), flag_expect, &flag_match, timeout_ms, opt) == K_ERR_NONE,
RET_FAIL);
return RET_OK;
}

View File

@ -31,7 +31,7 @@ tk_mutex_t* tk_mutex_create() {
tk_mutex_t* mutex = TKMEM_ZALLOC(tk_mutex_t);
return_value_if_fail(mutex != NULL, NULL);
if(tos_mutex_create(&(mutex->mutex)) != K_ERR_NONE) {
if (tos_mutex_create(&(mutex->mutex)) != K_ERR_NONE) {
TKMEM_FREE(mutex);
}