Real-Time Embedded Multithreading: Using ThreadX and ARM

Chapter 4: RTOS Building Blocks for System Development

4.1 Introduction

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


Figure 4.1: ThreadX components.

4.2 Defining Public Resources

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.

4.3 ThreadX Data Types

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...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Embedded Systems Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.