Skip to content

Commit

Permalink
improve atomic.h
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Nov 19, 2024
1 parent 3a2415b commit d6dda4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
2024/11/19
* 增加函数 str_append_format_padding
* 增加 atomic_compare_exchange(感谢兆坤提供补丁)
* 完善 atomic(感谢兆坤提供补丁)

2024/11/18
* 完善 atomic(感谢兆坤提供补丁)
Expand Down
6 changes: 3 additions & 3 deletions src/tkc/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static bool_t tk_atomic_compare_exchange_strong(tk_atomic_t* atomic, value_t* ex
default: {
/* tk_atomic_support_value_type() 已经判断过了,正常不可能会跑到这里 */
assert(!"Not support type!");
return RET_BAD_PARAMS;
return FALSE;
} break;
}

Expand Down Expand Up @@ -696,7 +696,7 @@ static bool_t tk_atomic_compare_exchange_weak(tk_atomic_t* atomic, value_t* expe
default: {
/* tk_atomic_support_value_type() 已经判断过了,正常不可能会跑到这里 */
assert(!"Not support type!");
return RET_BAD_PARAMS;
return FALSE;
} break;
}

Expand Down Expand Up @@ -757,7 +757,7 @@ static bool_t tk_atomic_compare_exchange_strong(tk_atomic_t* atomic, value_t* ex
default: {
/* tk_atomic_support_value_type() 已经判断过了,正常不可能会跑到这里 */
assert(!"Not support type!");
return RET_BAD_PARAMS;
return FALSE;
} break;
}

Expand Down

0 comments on commit d6dda4f

Please sign in to comment.