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.
stim_remove_event(int8_t id) 这个函数内部会调用recycle_event(struct stim_event *event);但是recycle_event这个函数默认是在当前链表list_manager.cur_index删除对应的event。而stim_remove_event(int8_t id)这个函数在找出id对应的event的时候会遍历list_manager.list[i],此时找出要recycle的event不一定就在当前链表中list_manager.list[list_manager.cur_index]。recycle_event(struct stim_event *event)内部还会调用remove_node(struct stim_event *event,struct stim_event_list *list)。调用remove_node这个函数的前提是传入的event必须确实位于list链表中,否则会出现异常。