Using OS resources


This article provides references to other articles that contain some down-to-earth examples of how to use the VxWorks OS resources (threads, semaphores, message queues). General reference is made to the "VxWorks Kernel API Reference" available from the on-line help (Workbench menu Help > Help Contents, expand Wind River Documentation > References > Operating System VxWorks Kernel API Reference).

The purpose is to show one way of using the OS resources. Reading the articles will raise a lot of "what if"-questions, because there are a lot of alternative ways to do things. It is not the purpose of these examples to cover these alternatives. For answers to your "what if" questions, refer to the VxWorks Kernel API Reference.

It is highly recommended that you read through the full article on a specific subject at least once, as the examples provided interconnect.

Basics of the OS resources

Threads -- Thread creation, activation, suspension, deletion
Semaphores -- Creation and use of counting semaphores, binary semaphores, and mutexes
Message queues -- Creation and use of message queues

Programming Examples

Thread Synchronization -- Two threads that synchronize on a binary semaphore
Shared Resource -- Two threads that share a resource that is protected with a mutex
Sending and receiving messages -- A thread sends messages to another thread through a message queue