Semaphore Overview (C++)

Semaphore Overview (C++)

Semaphore is a very important synchronization mechanism in concurrent programming (multithreading/multiprocessing), used to control access to shared resources by multiple threads or processes, preventing issues such as race conditions, data inconsistency, or deadlocks. 1. What is a Semaphore? ✅ Definition: A semaphore is a synchronization tool used to control access to shared resources by multiple … Read more

Semaphore Special Topic (C)

Semaphore Special Topic (C)

A semaphore is a mechanism used for inter-process synchronization and mutual exclusion, widely applied in multithreaded programming and operating systems. Semaphores can control access to shared resources, ensuring that multiple processes or threads can orderly use these resources, avoiding race conditions. 1. What is a Semaphore? ✅ Definition: A semaphore is a synchronization mechanism used … Read more

ThreadX: Summary of Application Layer APIs

ThreadX: Summary of Application Layer APIs

In the ThreadX real-time operating system, the API functions that users can call cover various aspects such as task management, synchronization mechanisms, memory management, timers, event flags, message queues, and debugging. Below is a list of ThreadX user interface functions categorized by functionality: 1. Thread Management Functions Function Interface Function Create Thread <span>tx_thread_create()</span> Delete Thread … Read more

FreeRTOS Queue Module (Part 2)

FreeRTOS Queue Module (Part 2)

The Queue in real-time operating systems (RTOS) such as FreeRTOS is a very important communication mechanism, mainly used for 1. Inter-Process Communication (IPC) and data transfer between tasks and interrupts.2. It can perform task synchronization and resource management. General queues can protect and utilize resources by implementing semaphores and mutexes.This article, as the second part … Read more

FreeRTOS – Semaphore Overview

FreeRTOS - Semaphore Overview

This article introduces the concept and usage of semaphores in the FreeRTOS operating system. It demonstrates resource sharing between different tasks through button presses and serial communication. Introduction A semaphore is a synchronization mechanism used for resource management when multiple tasks access the same resource. Semaphores can be categorized into binary semaphores (similar to “flags”, … Read more

Learning FreeRTOS: Mutex Semaphores

Learning FreeRTOS: Mutex Semaphores

Scan to followLearn Embedded Together, learn and grow together A mutex semaphore (Mutex, short for Mutual Exclusion) is a special type of binary semaphore in FreeRTOS, specifically designed for implementing mutual access to resources. Compared to ordinary semaphores, mutex semaphores have the following key characteristics: Ownership Concept: Only the task that takes the mutex can … Read more

Learning FreeRTOS: Counting Semaphores

Learning FreeRTOS: Counting Semaphores

Scan to followLearn Embedded Together, learn and grow together This is a series of introductory articles on FreeRTOS. While organizing my knowledge, I hope to help beginners quickly get started and master the basic principles and usage of FreeRTOS. Quick Start with FreeRTOS – Initial Exploration of the System The official Chinese version of the … Read more