I can not think of a logical solution to the problem. There are two streams - the main and child. They must in turn display a message like this:
Parent
Child
Parent
... and so forth 10 times each.
You can only use pthread mutexes and do not use idle cycle. Idle cycle is allowed only during the initialization phase. Who - anyone know of a nice solution?