CMSIS-RTOS: Inter-Thread Communication and Resource Sharing

| CMSIS-RTOS Version 1.03 Real-Time Operating System: API and RTX Reference Implementation.

- Main Page
- Usage and Description
- Reference

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Content
Inter-Thread Communication and Resource Sharing
CMSIS-RTOS API

Functions for inter-thread communication. More...

## Content

| Signal Events
| Synchronize threads using signals.
| Message Queue
| Exchange messages between threads in a FIFO-like operation.
| Memory Pool
| Manage thread-safe fixed-size blocks of dynamic memory.
| Mail Queue
| Exchange data between threads using a queue of memory blocks.
| Mutexes
| Synchronize resource access using Mutual Exclusion (Mutex).
| Semaphores
| Access shared resources simultaneously from different threads.

## Description

In most applications, threads need to communicate with each other or access shared resources together. There are many ways to exchange data between threads, for example using shared data, polling loops and message passing.

Many resources in a microcontroller can be considered as serially-reusable. This means that they can be used repeatedly by different threads, but only by one thread at a time (for example communication peripherals such as UARTs, memory, and files that need to be modified).

The CMSIS-RTOS API provides different means to pass messages between threads to make inter-thread communication more efficient. Also, resource sharing is inherently supported. The following methods are available to the user:

## Inter-Thread Communication

- Signal Events
- Message Queue
- Memory Pool
- Mail Queue

## Resource Sharing

- Mutexes
- Semaphores