thread: lock & condition functions
thread: pthread_cond
change LIFO to FIFO