On Fri, Dec 2, 2011 at 11:23 AM, Randi Botse <nightdecoder@xxxxxxxxx> wrote: > 1. What the proper way to the main thread to wait for all co-threads > until finished? I'll do a semop() with sem_op=1 in each thread's start, and a sem_op=-1 when each thread's finished. Then in the main thread I'll wait with a sem_op = 0. > 2. After calling pthread_cond_signal() or pthread_cond_broadcast() > followed by sleep()/nanosleep(), > the condition variable looks like not signaled, (the co-thread > routine doesn't run). What make this? Please show the code snippet in the co-thread that is not working as well as the mainthread's method you try to wake up the co-threads -- To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html