User-level thread synchronization

User-level thread synchronization

Implemented API for creating user-level threads and provided synchronization primitives with non-preemptive scheduling.