title: sem_init(…): What is the value parameter for?
body: <p>In a class, we've had to use semaphores to accomplish work with threads. 
  The prototype (and header file) of sem_init is the following:</p>
  
  <blockquote>
    <p>int sem_init(sem_t *sem, int pshared, unsigned int value);</p>
  </blockquote>
  
  <p>but I don't understand what the value variable is used for. According to opengroup.org:</p>
  
  <blockquote>
    <p>value is an initial value to set the semaphore to </p>
  </blockquote>
  
  <p>"value is a value..." How does that help, what is it used for?</p>