-
- Downloads
HOTFIX:Fixes improper restoration of base_priority
Backport of upstream: 7601a27cee348f70bebcac95e8e8372fe0651bbf David Sidrane Thu Mar 16 14:16:18 2017 -1000 sem_holder:The logic for the list version is unchanged 3cc2a4f7c9bb495da6c59f373f8d0e7672e4ee13 David Sidrane Wed Mar 15 14:02:55 2017 -1000 sem_holder: Fixes improper restoration of base_priority caf8bac7fb9452f25a3297147e7b414d46e74c6f David Sidrane Mon Mar 13 22:54:13 2017 +0000 missing semi d66fd9f965f27eb0446d6aed24b8758674f98b53 David Sidrane Mon Mar 13 12:34:39 2017 -1000 semaphore:sem_boostholderprio prevent overrun of pend_reprios 3c00651cfef3a0d90bb9e6522463965ad8989e6c David Sidrane Mon Mar 13 11:56:31 2017 -1000 semaphore:sem_holder sem_findholder missing inintalization of pholder 4d760c5ea44c5f8d30a1a595800e9fbf4874e705 David Sidrane Mon Mar 13 10:46:26 2017 -1000 semaphore:sem_holder add DEBUGASSERTs modified 399f3067441941072664bdbfa1bfec8ff35aa449 Gregory Nutt Sat Mar 11 08:57:34 2017 -0600 A few cosmetic changes (removed file that had nothing to do with semaphore commit by OA) 60d8606b19a7e7c1285a0ef5e8addaaedf26b95f David Sidrane Fri Mar 10 06:38:17 2017 -1000 Priority Inversion fixes:Initalization 6cc8f9100b3c8026e73ca738aaa5120bd78dae74 David Sidrane Fri Mar 10 06:37:46 2017 -1000 Priority Inversion fixes:typo 360539afacc83132acdb83da8f20c468dbe4c63d Gregory Nutt Fri Mar 10 09:30:15 2017 -0600 Priority inheritance: When CONFIG_SEM_PREALLOCHOLDERS==0, there is only a single, hard-allocated holder structure. This is problem because in sem_wait() the holder is released, but needs to remain in the holder container a93e46d00c1bc3447fb290b866ed21d8f9c8e146 Gregory Nutt Fri Mar 10 08:54:50 2017 -0600 Cosmetic (missleading OA commit message) Using !pholder is now pholder == NULL sem_holder: Fixes improper restoration of base_priority in the case of CONFIG_SEM_PREALLOCHOLDERS=0 Original code did not take into accout that 2 holder are needed and failed silently when a slot could not be allocated The call to sem_restorebaseprio_task context switches in the sem_foreachholder(sem, sem_restoreholderprioB, stcb); call prior to releasing the holder. So the running task is left as a holder as is the started task. Leaving both slots filled Thus failing to perforem the boost/or restoration on the correct tcb. This PR fixes this by releasing the running task slot prior to reprioritization that can lead to the context switch. To faclitate this, the interface to sem_restorebaseprio needed to take the tcb from the holder prior to the holder being freed. In the failure case where sched_verifytcb fails it added the overhead of looking up the holder. There is also the additional thunking on the foreach to get from holer to holder->tcb.
nuttx-patches/priority_restoration_fix.patch
0 → 100644
Please register or sign in to comment