#include int random_in_range(int min, int max); typedef pthread_mutex_t *semaphore; int start_thread(void *f, int x); void wait_for_exit(int thr); semaphore create_semaphore(void); void grab(semaphore s); void release(semaphore s);