Previous Topic

Next Topic

Book Contents

Book Index

Semaphores: Programming examples

In this section we will present some examples of how semaphores might be used. Each example highlights some particular way in which they can be used, but is not a complete working program.

Previous Topic

Next Topic

In This Chapter

Example (Basic): Setting and testing semaphores

Example (Intermediate): Combining semaphores (Boolean processing)

Example (Advanced): Using semaphores to latch inputs

Example (Advanced): Combining semaphores and Branch instructions

Example (Advanced): Indexing semaphores