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

Fix for Issue #7308 (Deep_sleep_lock Ticker.h Issue) #9483

Merged
merged 1 commit into from Jan 29, 2019

Conversation

Projects
None yet
6 participants
@mprse
Copy link
Member

mprse commented Jan 24, 2019

Description

Provide fix for issue #7308.

Code used to reproduce the issue:

void test()
{
    Ticker ticker;

    ticker.attach_us(callback(stop_gtimer_set_flag), 1000);
    while (!ticker_callback_flag);
    ticker.detach();
}

Test has been built with MBED_SLEEP_TRACING_ENABLED flag. Usage of Ticker should result in locking deep sleep.

Results on master without fix:

[1548322380.64][CONN][INF] found KV pair in stream: {{__testcase_name;Test}}, queued...
[1548322380.71][CONN][RXD] >>> Running case #1: 'Test'...
[1548322380.78][CONN][INF] found KV pair in stream: {{__testcase_start;Test}}, queued...
-> [1548322380.83][CONN][RXD] LOCK: Ticker.h, ln: 125, lock count: 1
-> [1548322380.89][CONN][RXD] Unlocking sleep for driver that was not previously locked: Ticker.cpp, ln: 32
[1548322380.97][CONN][INF] found KV pair in stream: {{__testcase_finish;Test;1;0}}, queued...

Results with this fix:

[1548322463.11][CONN][INF] found KV pair in stream: {{__testcase_name;Test}}, queued...
[1548322463.18][CONN][RXD] >>> Running case #1: 'Test'...
[1548322463.24][CONN][INF] found KV pair in stream: {{__testcase_start;Test}}, queued...
-> [1548322463.28][CONN][RXD] LOCK: Ticker.cpp, ln: 61, lock count: 1
-> [1548322463.32][CONN][RXD] UNLOCK: Ticker.cpp, ln: 32, lock count: 0
[1548322463.39][CONN][INF] found KV pair in stream: {{__testcase_finish;Test;1;0}}, queued...

Pull request type

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

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

@ciarmcom

This comment has been minimized.

Copy link
Member

ciarmcom commented Jan 24, 2019

@mprse, thank you for your changes.
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@deepikabhavnani
Copy link
Contributor

deepikabhavnani left a comment

Looks good :+

@cmonr

cmonr approved these changes Jan 28, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

cmonr commented Jan 28, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Jan 28, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr added ready for merge and removed needs: CI labels Jan 29, 2019

@0xc0170 0xc0170 merged commit d1b367f into ARMmbed:master Jan 29, 2019

24 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-ARMC6 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(-24 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 8994 cycles (-255 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
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
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.