title: C Threaded Programming - Incrementing a shared variable
body: <p>Hey guys...so I'm trying to brush up on my C threads and a question I've found is this:</p>
  
  <p>Given a global variable int x = 0; implement the function void useless(int n) which creates n threads which in a loop increase x by 1, each thread terminates when x reaches 100. </p>
  
  <p>I just don't have a handle on threads and need a solid example to base my foundation. This must use pthread system calls as much as possible.</p>