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

Constrained Stack: No need for individual locks #1481

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

mrdeep1
Copy link
Collaborator

@mrdeep1 mrdeep1 commented Jul 19, 2024

If a proxy reads in a packet via coap_read_endpoint, which then invokes an ongoing proxy TCP connection, while waiting for the CSM response of the new session, coap_read_endpoint would get invoked again if there is any data to read on any of the listening endpoints..

With a Constrained Stack, the read in data is protected by mutex m_read_enpoint - which is still locked when trying to wait for the CSM.

As the code is either single threaded, or protected by global_lock if multi-threaded, there is no need to maintain mutexes such as m_read_endpoint. This PR removes these not needed mutexes.

If a proxy reads in a packet via coap_read_endpoint, which then
invokes an ongoing proxy TCP connection, while waiting for the CSM
response of the new session, coap_read_endpoint would get invoked
again if there is any data to read on any of the listening endpoints..

With a Constrained Stack, the read in data is protected by mutex
m_read_enpoint - which is still locked when trying to wait for the
CSM.

As the code is either single threaded, or protected by global_lock
if multi-threaded, there is no need to maintain mutexes such as
m_read_endpoint.  This PR removes these not needed mutexes.
@mrdeep1 mrdeep1 merged commit b75c784 into obgm:develop Jul 22, 2024
31 checks passed
@mrdeep1 mrdeep1 deleted the m_read_endpoint branch July 22, 2024 07:47
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

Successfully merging this pull request may close these issues.

1 participant