#73 configTIMER_TASK_PRIORITY compile time check

open
nobody
None
2
2013-07-12
2013-07-12
piityy
No

Hi,
configTIMER_TASK_PRIORITY can be set above configMAX_PRIORITIES. This is probably eventualy catched in runtime by assert in xTaskCreate() if enabled.
This could be catched sooner in compile time which would be nice :).
Problem is different definition of configMAX_PRIORITIES (containing data type). Test demo works correctly if type is removed from definition but i have no idea about possible side effects.

Have a nice day.
p.

Discussion

  • Richard

    Richard - 2013-07-12

    Just like any other task, if you attempt to create the timer service task at a priority above ( configMAX_PRIORITIES - 1 ) it's actual priority will be capped to ( configMAX_PRIORITIES - 1 ) - which is the maximum possible priority. As you say, it will also be caught by an assert. For the reasons you already mention I'm not sure it is desirable to do any more than that.

     
  • Richard

    Richard - 2013-07-12
    • priority: 5 --> 2
     
  • piityy

    piityy - 2013-07-12

    I didn't note that an assert is active by default(it is disabled in cortex's peripheral library and i didn't search more, my mistake) and mcu stopped. But it make sense when OS core is HW independent.
    Automatical priority limit (with assert disabled) is good enough.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks