The libpsync library provides lightweight portable synchronization primitives (thread, mutex, semaphore, etc.) for C/C++ under a non-restrictive license.