POSIX Threads: Thread Queues and Synchronization Internals

What Really Happens When You Call pthread_mutex_lock()? When you write a multithreaded program and call pthread_mutex_lock(), the operation either succeeds immediately or blocks your thread until the resource becomes available. While this appears straightforward from an API perspective, the underlying implementation involves sophisticated thread queues, priority management, and scheduling algorithms that remain hidden from most developers. Pthreads: The Foundation of Portable Threading POSIX Threads (pthreads) have become irreplaceable in C programming across Unix-like systems, from web servers to embedded real-time systems. They represent a standardized solution to multithreaded programming challenges. ...

June 24, 2025

Submitting Patches To Newlib

Contributing to Newlib: A Step-by-Step Guide If you’re interested in contributing to Newlib, the C standard library used by many embedded systems (including RTEMS and Cygwin), this guide will walk you through the process of submitting patches. What is Newlib? Newlib is a C standard library implementation intended for use on embedded systems. It’s widely used in projects like RTEMS, Cygwin, and various bare-metal environments. Part 1: Creating and Submitting Patches 1. Clone the Repository First, you need to clone the newlib-cygwin repository: ...

June 17, 2025

New APIs Added to POSIX Standard (Issue 8): A Comprehensive Implementation Guide

The POSIX Standard Issue 8, released in 2024, represents a significant milestone in operating system standardization, introducing essential APIs that enhance portability, functionality, and compliance across Unix-like systems. As part of my Google Summer of Code 2025 project with RTEMS. Project Overview: Bridging the POSIX Gap in RTEMS RTEMS, known for its reliability in mission-critical applications in space exploration currently lacks support for several key APIs introduced in POSIX Issue 8. This project aims to analyze, implement, and thoroughly test these missing APIs. ...

June 1, 2025