Gregory Nutt
3e13ed2400
Within the OS, when a thread obtains a semaphore count it must call sem_addholder() if CONFIG_PRIORITY_INHERITANCE is enabled. If a count is available, then sem_wait() calls sem_addholder(), otherwise it waited for the semaphore and called sem_addholder() when it eventually received the count.
...
This caused a problem when the thread calling sem_wait() was very low priority. When it received the count, there may be higher priority threads "hogging" the CPU that prevent the lower priority task from running and, as a result, the sem_addholder() may be delayed indefinitely.
The fix was to have sem_post() call sem_addholder() just before restarting the thread waiting for the semaphore count.
This problem was noted by Benix Vincent who also suggested the solution.
2016-10-26 07:23:15 -06:00
Gregory Nutt
6543c570d4
Remove some empty file section section header comments
2016-02-17 17:38:39 -06:00
Gregory Nutt
cb9e27c3b0
Standardize naming used for public data and function groupings
2015-10-02 16:30:35 -06:00
Gregory Nutt
2c66e0eb2a
sem_tickwait(): Add a new, non-standard function to perform timed semaphore waits. It is functionally equialent to the standard sem_timedwait(), but more efficient for use in higher performance device drivers. Requested by Max Neklyudov
2015-08-01 07:31:09 -06:00
Gregory Nutt
78b755961f
Semahores: Remove a warning with SIGNALS are disabled
2014-12-28 14:54:40 -06:00
Gregory Nutt
b3a1939020
Sempahores: Add logic to clean up after task_delete() or pthread_cancel() if the task happens to be waiting on a semaphore when it is cancelled
2014-12-13 12:02:25 -06:00
Gregory Nutt
8c958be5ab
Semaphore initialization is now only required if priority inheritance is initialized
2014-09-29 06:50:48 -06:00
Gregory Nutt
650a0d0615
Completes VFS-based named semaphore implemetation. Still a little buggy
2014-09-28 15:58:56 -06:00
Gregory Nutt
a41c1de32c
Add basic data structures that will allow us to move named semaphore support out of the OS and into the VFS (not complete).
2014-09-28 10:15:33 -06:00
Gregory Nutt
e10a23ae50
Move environment files from sched/ to sched/environ
2014-08-08 13:53:29 -06:00