Conversation
Why: 1. bits_button_ticks() 和 bits_button_reset_states() 在未调用 bits_button_init() 时, 会因 _read_button_level 为 NULL 导致崩溃,现在入口添加 NULL 防护提前返回; 2. bits_button_init() 在校验完成前就 memset 清零全局状态,导致后续校验失败时 之前成功的初始化配置被破坏。现将所有参数校验移至 memset 之前,确保校验 全部通过后才修改全局状态; 3. 补充 buffer_modes.md 中 C11 缓冲区的 SPSC 线程安全约束说明, 明确裸机主循环、中断+主循环、RTOS 多线程三种场景的安全使用方式
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why: