Skip to content

Fixes to osDelayUntil#19

Merged
VladimirUmek merged 2 commits intoARM-software:developfrom
CppBaddy:CppBaddy-osDelayUntil-patch
Feb 6, 2019
Merged

Fixes to osDelayUntil#19
VladimirUmek merged 2 commits intoARM-software:developfrom
CppBaddy:CppBaddy-osDelayUntil-patch

Conversation

@CppBaddy
Copy link
Copy Markdown
Contributor

@CppBaddy CppBaddy commented Feb 6, 2019

This fix addresses two use cases:

  1. FreeRTOS debug build assert when pass zero as a second parameter to vTaskDelayUntil.
  2. Very very long delay if we pass in target tick which already has expired (in a past)

This fix addresses two use cases:
1. FreeRTOS debug build assert when pass zero as a second parameter to vTaskDelayUntil.
2. Very very long delay if we pass in target tick which already has expired (in a past)
@VladimirUmek
Copy link
Copy Markdown
Collaborator

VladimirUmek commented Feb 6, 2019

Hi, many thanks for providing this fix!

I fully agree with it, but there are syntax errors and we must return an error in case if provided delay cannot be execute.
It would be great if you could add something like:

    if (delay && 0 == (delay >> (8 * sizeof(TickType_t) - 1))) {
      vTaskDelayUntil (&tcnt, delay);
    }
    else {
      /* No delay or already expired */
      stat = osErrorParameter;
    }

@VladimirUmek VladimirUmek self-assigned this Feb 6, 2019
@CppBaddy
Copy link
Copy Markdown
Contributor Author

CppBaddy commented Feb 6, 2019

Hi Vladimir,
Added your proposed changes and fixed missing bracket too.
Cheers,
Yulay

@VladimirUmek VladimirUmek merged commit 2e535f7 into ARM-software:develop Feb 6, 2019
@VladimirUmek
Copy link
Copy Markdown
Collaborator

Great, thanks!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants