Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
C programming with threads
·
Module 1
Core Thread Management and Mutex Synchronization
1
Thread Arguments with Struct Pointers and Memory Management
Pass multiple arguments to thread functions using struct pointers and manage associated memory.
2
Joining Threads with pthread_join
Join threads to synchronize termination and retrieve return values using pthread_join.
3
Detaching Threads with pthread_detach
Detach threads using pthread_detach and explain scenarios where this is appropriate.
4
Robust Threading with Error Handling
Implement robust thread creation and mutex initialization with comprehensive error checking.
5
Mutex Locks for Thread Synchronization
Protect critical sections and enforce mutual exclusion using pthread_mutex_lock and pthread_mutex_unlock.
6
Non-Blocking Mutex Acquisition with `pthread_mutex_trylock`
Use pthread_mutex_trylock for non-blocking lock acquisition strategies.
7
Thread-Safe Counter with Mutex
Implement a practical thread-safe counter using a mutex to prevent race conditions.
Previous module
Next module
Condition Variables and a Bounded Buffer