
Why RTOS Queues Copy Data Instead of Passing Pointers
FreeRTOS queues copy items by value so senders can reuse variables, stack data stays safe and ownership is clear. See the trade-offs and when to pass pointers.
Tag
445 posts

FreeRTOS queues copy items by value so senders can reuse variables, stack data stays safe and ownership is clear. See the trade-offs and when to pass pointers.

Send and receive messages between processes with POSIX message queues: mq_open, priorities, the mq_receive buffer rule, limits and cleanup on Linux 6.12.

Sleep, Stop and Standby are the three usual low-power modes on a Cortex-M microcontroller. Learn what each one turns off, what it keeps and how it wakes.

Learn the Z80 register set: the accumulator and flags, the BC, DE and HL pairs, IX and IY, SP, the I and R registers and the shadow set swapped by EXX.

Pass messages between FreeRTOS tasks with a queue: create it, send with xQueueSend, receive with xQueueReceive, set timeouts and check the return values.

Share memory between unrelated processes with POSIX shm_open, ftruncate and mmap, add a writer and a reader, and learn the cleanup with shm_unlink. Linux 6.12.

glibc wrappers are not thin pass-throughs. See how open becomes openat, exit becomes exit_group, fork becomes clone, and which calls never reach the kernel.

Write counted loops on the 6502 with DEX and BNE: count down to zero, avoid the 256-iteration trap, nest loops for counts above 255 and work out the cycle cost.

Compare Linux IPC options for beginners: pipes, FIFOs, Unix sockets, shared memory, message queues, semaphores and signals, and which fits which job.

The kernel returns -errno in the result register, and the C library turns values from -4095 to -1 into errno and a return of -1. See the raw path and the rules.

Read a Linux binary's CPU architecture, bit width, float ABI and loader with file, readelf -h, readelf -A and xxd, before you copy it to a board.

Learn the 6502 addressing modes: immediate, zero page, absolute, indexed with X and Y, indirect indexed and indexed indirect, with traced examples.