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

[Photon/P1] Fixes thread priority issues #1346

Merged
merged 5 commits into from Jul 10, 2017

Conversation

@avtolstoy
Copy link
Member

commented Jun 20, 2017

Problem

  • Closes #1344
  • Another known issue related to this is connecting to enterprise access points with SYSTEM_THREAD(ENABLED)

Solution

  • Constantly holding a mutex breaks priority inheritance mechanisms in FreeRTOS. Do not block _start mutex in ActiveObjectBase
  • [Photon/P1] socket_hal: Some cosmetic changes: wiced semaphores replaced by os_mutex_t, std::vector replaced with spark::Vector, SocketListLock implemented with std::lock_guard
  • TCPClient: It's much better to just copy from a previously created s_invalid_client static TCPClient(socket_handle_invalid()) when there are no new connections, instead of allocating new one each call
  • Updated Supplicant_BESL.a. See particle-iot/photon-wiced#14

Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation (N/A)
  • Added to CHANGELOG.md after merging (add links to docs and issues)

Bug fix

  • [PR #1346] [Fixes #1344] [Photon/P1] When using SYSTEM_THREAD(ENABLED) the TCPServer and WPA Enterprise connections were broken.
avtolstoy added 4 commits Jun 20, 2017
Constantly holding a mutex breaks priority inheritance mechanisms in …
…FreeRTOS. Do not block _start mutex in ActiveObjectBase. It's not even used anywhere
[Photon/P1] socket_hal: Some cosmetic changes: wiced semaphores repla…
…ced by os_mutex_t, std::vector replaced with spark::Vector, SocketListLock implemented with std::lock_guard
TCPClient: It's much better to just copy from a previously created s_…
…invalid_client static TCPClient(socket_handle_invalid()) when there are no new connections, instead of allocating new one each call

@avtolstoy avtolstoy added this to the 0.7.0 milestone Jun 20, 2017

@avtolstoy avtolstoy requested a review from sergeuz Jun 20, 2017

@sergeuz
Copy link
Member

left a comment

EAP-TLS authentication and TCPServer work perfectly with threading enabled 👍

@avtolstoy avtolstoy changed the base branch from release/v0.7.0-rc.1 to develop Jun 21, 2017

@avtolstoy avtolstoy changed the base branch from develop to release/v0.7.0-rc.2 Jun 27, 2017

@technobly technobly added the bug label Jul 10, 2017

@technobly technobly merged commit 744a7b9 into release/v0.7.0-rc.2 Jul 10, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.