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

cpu: native: fix native timer_set_absolute() #4585

Merged
merged 3 commits into from
Jan 7, 2016

Conversation

kaspar030
Copy link
Contributor

In #3344 I introduced a safeguard for native's indeterministic timers which would cause a timer with a very close absolute target time to be triggered at once in order to prevent an underflow.

Turned out that xtimer triggers this safeguard when 1. initializing the timer (setting it to 0), 2. setting an absolute target of 0xFFFFFFFF for its overflow, causing the first overflow to occur 2^32 usec too early.

@kaspar030 kaspar030 added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Jan 6, 2016
@kaspar030 kaspar030 added this to the Release 2015.12 milestone Jan 6, 2016
@kaspar030
Copy link
Contributor Author

Might fix #4513.

@cgundogan
Copy link
Member

With this fix I was able to run the unittests tests-fib and tests-fib_sr successfully.
@authmillenon can you verify if this also fixes #4513 for you?

@kaspar030 could you also provide a backport to the release branch?

@cgundogan cgundogan added the Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch label Jan 6, 2016
@miri64
Copy link
Member

miri64 commented Jan 6, 2016

verified.

@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jan 6, 2016
@miri64
Copy link
Member

miri64 commented Jan 6, 2016

ACK and go, when travis is green.

@miri64
Copy link
Member

miri64 commented Jan 6, 2016

NHDP issue is fixed in #4591.

@kaspar030 kaspar030 added the State: waiting for other PR State: The PR requires another PR to be merged first label Jan 6, 2016
@kaspar030 kaspar030 force-pushed the fix_native_timer_set_absolute branch from efa2f6c to d305643 Compare January 6, 2016 21:08
@kaspar030
Copy link
Contributor Author

@cgundogan cgundogan removed State: waiting for other PR State: The PR requires another PR to be merged first Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch labels Jan 6, 2016

int main(void)
{
unsigned n = ITERATIONS;
Copy link
Member

Choose a reason for hiding this comment

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

ITERATIONS is greater than 2 << 16 (which is relevant since unsigned is uint16_t on MSP-430 and AVR ;-))

@cgundogan
Copy link
Member

ACK and GO as soon as @kaspar030 addressed @authmillenon's comment and travis shows green

@kaspar030 kaspar030 force-pushed the fix_native_timer_set_absolute branch from d305643 to 781ee87 Compare January 7, 2016 18:34
@kaspar030
Copy link
Contributor Author

  • adressed comment

@cgundogan
Copy link
Member

Travis is green - GO

cgundogan added a commit that referenced this pull request Jan 7, 2016
cpu: native: fix native timer_set_absolute()
@cgundogan cgundogan merged commit 2cd2738 into RIOT-OS:master Jan 7, 2016
@kaspar030 kaspar030 deleted the fix_native_timer_set_absolute branch February 7, 2017 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants