Passing data through queues by value

Like semaphores and mutexes, queues are among the most widely used (and implemented) structures when operating across multiple asynchronously executing tasks. They can be found in nearly every operating system, so it is very beneficial to understand how to use them. We'll take a look at several different ways of using queues and interacting with them to affect a task's state. 

In the following examples, we'll learn how to use queues as a means of sending commands to an LED state machine. First, we'll examine a very simple use case, passing a single one-byte value to a queue and operating on it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.184.90