Embedded Linux: Thread Creation, Termination, Reclamation, Cancellation, and Detachment

Embedded Linux: Thread Creation, Termination, Reclamation, Cancellation, and Detachment

Click the blue text above to follow us The operations of thread creation, termination, cancellation, reclamation, and detachment are core to multithreaded programming. In multithreaded programming, it is essential to manage the lifecycle of threads properly to avoid issues such as resource leaks, race conditions, or zombie threads. 1 Creating Threads In Linux, by default, … Read more

Embedded Linux: Registering Thread Cleanup Handlers

Embedded Linux: Registering Thread Cleanup Handlers

Click the blue text above to follow us In Linux multithreading programming, specific cleanup operations can be performed when a thread terminates by registering a thread cleanup handler. This is similar to using atexit() to register process termination handlers. The thread cleanup handler is used to perform resource release or cleanup tasks when a thread … Read more

Does Embedded Development Require Architectural Design?

Does Embedded Development Require Architectural Design?

My Understanding of Architectural Design 1. Understanding of Architectural Design Concepts I believe most readers of this article are engaged in embedded development, and you may have noticed that job postings for architectural design roles on recruitment websites are predominantly focused on Web development, with very few openings for system architects in embedded positions. My … Read more

Microsecond-Level Delay Solutions on RTOS

Microsecond-Level Delay Solutions on RTOS

Microsecond-Level Delay Design Solutions Generally, in an RTOS system with a clock of 1KHz, the minimum time for thread_sleep() is 1ms. In real-time control, there are situations where microsecond (us) level delays are required. What should we do in this case? There are two implementation approaches for microsecond-level delays: one is to increase the system … Read more

Methods for Multithreaded Access to UART in RTOS

Methods for Multithreaded Access to UART in RTOS

Reader *Shi San* asks: Can the blogger introduce methods for multiple tasks to access the same hardware under RTOS? For example, multiple tasks need to use the serial port to print information. My answer is: Both mutexes and queues can solve the access conflict problem. Multithreaded access to the same serial hardware is commonly used … Read more

Microsecond-Level Delay Solutions in RTOS

Microsecond-Level Delay Solutions in RTOS

Follow+Star Public Account Number, don’t miss the wonderful content Source | MultiMCU EDU Typically, the RTOS system tick is 1KHz, of course, there are cases of 100Hz or 10KHz. At 1KHz, the shortest system delay is 1ms, and in real-time control, there are situations that require microsecond (us) level delays. What should we do? There … Read more

Multithreading with FreeRTOS on ESP32

Multithreading with FreeRTOS on ESP32

LingShun Lab (lingshunlab.com) mainly introduces how to use multithreading with FreeRTOS on the ESP32. What is Multithreading? It refers to the technology of implementing multiple threads to execute concurrently from software or hardware. Computers with multithreading capabilities can execute more than one thread at the same time due to hardware support, thereby improving overall processing … Read more