Thread Stacks

Chapter 33: Threads — Further Details

Summary & Quick Reference

Asynchronous Cancellation

Cleanup Handlers

Testing for Thread Cancellation

Cancellation Points

Cancellation State and Type

Canceling a Thread

Thread Cancellation

Thread-Local Storage

TSD in Practice

Thread-Specific Data (TSD)

One-Time Initialization

Thread Safety and Reentrancy

Thread Safety & Per-Thread Storage

Full Example & Dynamic Condition Variables

Testing a Condition Variable’s Predicate

Signaling and Waiting on Condition Variables

Condition Variables: Introduction

Dynamic Mutex, Attributes & Types

30.1.4 — Mutex Deadlocks

30.1.3 — Performance of Mutexes

30.1.2 — Locking and Unlocking a Mutex

30.1.1 — Statically Allocated Mutexes

The Problem: Shared Variables & Critical Sections

Chapter 30: Thread Synchronization

Threads vs Processes & Chapter Summary

Thread Attributes

Detaching a Thread

Joining with a Terminated Thread

Thread IDs

Thread Termination

Thread Creation — pthread_create()

Pthreads API — Background Details

Chapter 29: POSIX Threads (Pthreads)

Chapter 29: POSIX Threads (Pthreads)

Attribute Inheritance: exec() & fork()

Speed of Process Creation

waitpid() Extensions for Cloned Children