Real-Time Embedded Multithreading: Using ThreadX and ARM

An RTOS must provide a variety of services to the developer of real-time embedded systems. These services allow the developer to create, manipulate, and manage system resources and entities in order to facilitate application development. The major goal of this chapter is to review the services and components that are available with ThreadX. Figure 4.1 contains a summary of these services and components.
| Threads | Message queues | Counting semaphores |
| Mutexes | Event flags | Memory block pools |
| Memory byte pools | Application timers | Time counter & interrupt control |
Some of the components discussed are indicated as being public resources. If a component is a public resource, it means that it can be accessed from any thread. Note that accessing a component is not the same as owning it. For example, a mutex can be accessed from any thread, but it can be owned by only one thread at a time.
ThreadX uses special primitive data types that map directly to data types of the underlying C compiler. This is done to ensure portability between different C compilers. Figure 4.2 contains a summary of ThreadX service call data types and their associated meanings.
| Data Type | Description |
| UINT | Basic unsigned integer. This type must support 8-bit unsigned data; however, it is mapped to the most convenient unsigned data type, which may support 16- or 32-bit signed data. |
| ULONG | Unsigned long type. This type must support 32-bit unsigned data. |
| VOID | Almost... |