Introduction - If you have any usage issues, please Google them yourself
linux multithread programming is very convenient, but we must pay attention to synchronization and mutual exclusion.
The sample code shows us how to ensure multi-thread synchronization, mutual exclusion, using semaphore and P&V operations.