)]}'
{
  "commit": "990643ebe8c990dd3672a52079d274e7685df980",
  "tree": "b835696236c143ad40d4d891fd66a0b3f72c0a6a",
  "parents": [
    "abd887c687fb990014f38a3227f4ef1796eadf7b"
  ],
  "author": {
    "name": "Jeff Tenney",
    "email": "jeff.tenney@gmail.com",
    "time": "Mon Jan 10 12:44:12 2022 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Jan 10 12:44:12 2022 -0700"
  },
  "message": "Fix support for stepping tick by xExpectedIdleTime (#73)\n\n* Fix support for stepping maximum number of ticks\r\n\r\nThis commit fixes support for tickless implementations that call\r\nvTaskStepTick() with the maximum number of allowed ticks to step.\r\n\r\nvTaskStepTick()\r\n---------------\r\nFunction vTaskStepTick() provides a way for the tickless idle\r\nimplementation to account for ticks that elapse during tickless idle.\r\nThe maximum number of stepped ticks allowed is the number passed to\r\nportSUPPRESS_TICKS_AND_SLEEP().  It is the number of ticks between\r\nxTickCount and xNextTaskUnblockTime.\r\n\r\nvTaskStepTick() is specifically intended for use with tickless idle,\r\nso it always executes with the scheduler disabled.  For reference,\r\ncompare it with the more general function xTaskCatchUpTicks().\r\n\r\nWithout this Change\r\n-------------------\r\nPrior to this commit, if a task is supposed to wake at xTickCount \u003d\u003d\r\n0xFFFFFFFF, then when tickless idle ends, function vTaskStepTick()\r\nsets the tick to 0xFFFFFFFF but the task remains on the delayed list\r\nbecause xTaskIncrementTick() does not execute.  One tick later,\r\nxTaskIncrementTick() executes because it\u0027s time to increment xTickCount\r\nto 0x00000000.  An assertion failure occurs in\r\ntaskSWITCH_DELAYED_LISTS() because the delayed task list is not\r\nempty.  Other examples of valling vTaskStepTick() with the maximum\r\nallowed number of ticks merely result in a task waking one tick late.\r\n\r\nDefault Tickless Implementations\r\n--------------------------------\r\nNote that the default tickless implementations never pass the maximum\r\nallowed value to vTaskStepTick().  The default implementations use the\r\ntick interrupt to finish the sleep and allow that one tick to be\r\ncounted normally via the tick ISR and xTaskIncrementTick().\r\n\r\n* Protect xPendedTicks with critical section\r\n\r\nFunction xTaskIncrementTick() increments xPendedTicks when the\r\nscheduler is disabled.  That function typically executes inside the tick\r\nISR.  So code in xTaskCatchUpTicks() must mask interrupts when modifying\r\nxPendedTicks.\r\n\r\n* uncrustify tasks.c\r\n\r\n* Update tasks.c\r\n\r\nStyle changes only - added comment and indentation to the two modified files.\r\n\r\n* uncrustify\r\n\r\n* Add test coverage for new conditional\r\n\r\n* Add typecast\r\n\r\nCo-authored-by: Cobus van Eeden \u003c35851496+cobusve@users.noreply.github.com\u003e\r\nCo-authored-by: Joseph Julicher \u003cjjulicher@mac.com\u003e\r\nCo-authored-by: RichardBarry \u003c3073890+RichardBarry@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "007900f2a47f3034c1458aa4b3aed86ff494e1f1",
      "old_mode": 33188,
      "old_path": "include/task.h",
      "new_id": "f35a8d703d8c570af55e6a5d916d9f787b6afe3d",
      "new_mode": 33188,
      "new_path": "include/task.h"
    },
    {
      "type": "modify",
      "old_id": "88e699ca61f59cf238ed2ac6d7922bbddcd8d784",
      "old_mode": 33188,
      "old_path": "tasks.c",
      "new_id": "917b1986e1dd33b21d970e90aa10c31a9f8733f9",
      "new_mode": 33188,
      "new_path": "tasks.c"
    }
  ]
}
