Add constant definitions
Create threads
Add basic synchronization
Something working there
Use rand_r instead of rand