This package contains the starter code for the threading lab.  The
included Makefile will compile your solutions to the train and
reaction synchronization problems. The resulting binaries will try to
stress test what you wrote and should hopefully help you to shake out
any bugs.

You'll need to fill in train.c and reaction.c appropriately to
complete this assignment (the tests will certainly fail before you do
so). The 'make submit' target will create threadlab-submit.tar which
can then be upload to gradescope. 

You are to use the lock and condition variable APIs shown below. The
following types are defined already for your use:

   struct lock
   struct condition

As are the following functions:

    void lock_init(struct lock *lock);
    void lock_acquire(struct lock *lock);
    void lock_release(struct lock *lock);
    void cond_init(struct condition *cond);
    void cond_wait(struct condition *cond, struct lock *lock);
    void cond_signal(struct condition *cond, struct lock *lock);
    void cond_broadcast(struct condition *cond, struct lock *lock);

No other files need to be modified and you should not call any functions other
than the ones listed above. Compile using 'make'. To run a bunch of tests, you
can try 'make run'. These programs have been tested on the machines in the
Asprey lab and the machines in SP309.
