thread API:

  code generation:  openmp

  languages:  C,  C++,  python,  etc.

  OS:  pthread (POSIX)

waiting:

  while( ready == 0) ; // worst, wastes CPU

  while( ready == 0) sched_yield(); // better, but still wastes CPU

  while( ready == 0) Pthread_cond_wait( &cond, &lock); // best, but has overhead

