Softools Development Tools

Home Contact Softools Support
 

TurboTask Semaphores

 
Up
TurboTask Interrupt Support
TurboTask Message Boxes
TurboTask Queues
TurboTask Semaphores
 
Note
Semaphores can also be used to implement Mutexes.
 



 
  TurboTask Semaphores
 
bullet Semaphores allow one or more tasks to suspend when the semaphore is not available. This allows resource sharing for single thread devices (e.g. an LCD display).
bulletPriority inversion is automatically avoided in TurboTask semaphores.
bulletWhen more than one task is waiting on a semaphore, the current task that has the lock has its priority set to that of the waiting task with the highest priority.  This prevents priority inversion.  When the task unlocks the semaphore, its priority is restored and the task with the highest priority that is waiting is made ready.
 
 
   
Back
 
Copyright © 2005-2023, Softools. All rights reserved.