add the pthread_cond support and implement the syncronization queue