Skip to content

Make poll() use RTOS tick count #6698

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

Merged
merged 1 commit into from
Apr 27, 2018
Merged

Make poll() use RTOS tick count #6698

merged 1 commit into from
Apr 27, 2018

Conversation

kjbracey
Copy link
Contributor

Description

RTOS maintains a tick count - use it, avoiding issues with sleep and low power timers.

This follows on from similar changes in #6653 and #6693

Supersedes #6418 for RTOS builds.

Pull request type

[ ] Fix
[X] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@kjbracey
Copy link
Contributor Author

@amq - should still work for you, I hope.

geky
geky previously approved these changes Apr 23, 2018
Copy link
Contributor

@geky geky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

if (timeout > 0) {
start_time = Kernel::get_ms_count();
}
#define time_elapsed() int64_t(Kernel::get_ms_count() - start_time)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Should this be in all-caps as a macro?

RTOS maintains a tick count - use it, avoiding issues with sleep and low
power timers.
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 23, 2018

@geky leave approve/request changes please

Copy link
Contributor

@geky geky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I thought I did approve

Copy link
Contributor

@geky geky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I did, it was dismissed by an update. I understand now.

@0xc0170 0xc0170 requested a review from bulislaw April 23, 2018 13:16
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 25, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Apr 25, 2018

Build : SUCCESS

Build number : 1853
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6698/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Apr 25, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 25, 2018

/morph export-build

@mbed-ci
Copy link

mbed-ci commented Apr 25, 2018

@mbed-ci
Copy link

mbed-ci commented Apr 25, 2018

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

Successfully merging this pull request may close these issues.

6 participants