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

InternetSocket: use atomics, not volatile #9248

Merged
merged 2 commits into from Jan 21, 2019

Conversation

Projects
None yet
7 participants
@kjbracey-arm
Copy link
Contributor

commented Jan 3, 2019

Description

Use a better tool for the job for the _pending counter, and properly protect _callback.

Pull request type

[ ] Fix
[X] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@ciarmcom ciarmcom requested review from ARMmbed/mbed-os-maintainers Jan 3, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Jan 3, 2019

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:socket_pending_atomic branch 3 times, most recently Jan 4, 2019

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Jan 4, 2019

Adjusted to use atomic_flag rather than a uint32_t counter. We don't need the count. This means it no longer depends on #9247.

@0xc0170

0xc0170 approved these changes Jan 4, 2019

@deepikabhavnani
Copy link
Contributor

left a comment

Build failures because of missing , in constructor.
Looks good to me 👍

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Jan 4, 2019

CI started

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Jan 4, 2019

Whoops, jumped the gun.

@kjbracey-arm Please take a look at the Travis CI failures.

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:socket_pending_atomic branch Jan 4, 2019

@mbed-ci

This comment has been minimized.

Copy link

commented Jan 4, 2019

Test run: FAILED

Summary: 1 of 1 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:socket_pending_atomic branch Jan 7, 2019

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Jan 7, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Jan 8, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Jan 8, 2019

Test run: FAILED

Summary: 1 of 1 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests
@0xc0170

This comment has been minimized.

Copy link
Member

commented Jan 8, 2019

Unittest failures, please review

@0xc0170 0xc0170 added needs: work and removed needs: CI labels Jan 8, 2019

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:socket_pending_atomic branch Jan 8, 2019

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Jan 14, 2019

Missed TCPServer - try again.

@0xc0170

This comment has been minimized.

Copy link
Member

commented Jan 14, 2019

CI restarted

@mbed-ci

This comment has been minimized.

Copy link

commented Jan 14, 2019

Test run: FAILED

Summary: 1 of 1 test jobs failed
Build number : 5
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:socket_pending_atomic branch 2 times, most recently from cdcb274 Jan 16, 2019

@cmonr cmonr added needs: CI and removed needs: work labels Jan 17, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

NOTE: This PR has now been rebased.

If this was made in error, feel free to force-push your local branch to restore the PR.

@cmonr cmonr force-pushed the kjbracey-arm:socket_pending_atomic branch Jan 17, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

@kegilbert Could you help verify if the docy-spellcheck errors are valid?

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

SIGH

travis-ci/doxy-spellcheck failure is caused by something slipping in whilst the PR that enabled the job was making it's way through testing.

mbed-os master is broken (https://travis-ci.org/ARMmbed/mbed-os/jobs/480700843) and needs a fix to progress this PR. Hold tight.

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

NOTE: This PR has now been rebased.

If this was made in error, feel free to force-push your local branch to restore the PR.

@cmonr cmonr force-pushed the kjbracey-arm:socket_pending_atomic branch Jan 17, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Jan 18, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Jan 18, 2019

Test run: FAILED

Summary: 1 of 1 test jobs failed
Build number : 6
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:socket_pending_atomic branch Jan 18, 2019

@kjbracey-arm

This comment has been minimized.

Copy link
Contributor Author

commented Jan 18, 2019

There was a rebase error somewhere in all that - here's yet another version.

@0xc0170

This comment has been minimized.

Copy link
Member

commented Jan 18, 2019

CI restarted

@mbed-ci

This comment has been minimized.

Copy link

commented Jan 18, 2019

Test run: FAILED

Summary: 1 of 1 test jobs failed
Build number : 7
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests

kjbracey-arm added some commits Jan 3, 2019

InternetSocket: Use atomics, not volatile
Use a better tool for the job.
InternetSocket: better protect _callback
sigio callbacks can be triggered from interrupt, so changing _callback
needs critical section protection, not just a mutex.

@kjbracey-arm kjbracey-arm force-pushed the kjbracey-arm:socket_pending_atomic branch to ab037c6 Jan 18, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Jan 18, 2019

CI restarted

@mbed-ci

This comment has been minimized.

Copy link

commented Jan 19, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 8
Build artifacts

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Jan 21, 2019

@0xc0170 0xc0170 merged commit 67dd449 into ARMmbed:master Jan 21, 2019

22 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9211 cycles
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@kjbracey-arm kjbracey-arm deleted the kjbracey-arm:socket_pending_atomic branch Jan 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.