Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有关AT socket事件通知,好像有bug #192

Open
deqoder opened this issue Mar 2, 2023 · 3 comments
Open

有关AT socket事件通知,好像有bug #192

deqoder opened this issue Mar 2, 2023 · 3 comments

Comments

@deqoder
Copy link

deqoder commented Mar 2, 2023

一个struct at_device中有一个rt_event_t socket_event;
但是有N个struct at_socket *sockets;
每次connect或send或close时,会先清一下事件,然后等事件发生;
虽然at_obj_exec_cmd是加锁的,但清事件写在外面没有加锁,
所以有可能,其中一个线程再等事件,另一个刚调用,就会误清事件。

@deqoder
Copy link
Author

deqoder commented Mar 3, 2023

我仔细看了一下,send函数都加锁了,但connect和close没有加

@mysterywolf
Copy link
Member

可否提交一个PR呀

@yangpengya
Copy link
Contributor

我觉得应该把rt_event_t socket_event放在struct at_socket里,每个socket独立使用自己的event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants