int userMain(int arg)
{
int threadBodyA(int), threadBodyB(int), threadBodyC(int);
threadCreate(20, threadBodyA, 0);
threadCreate(20, threadBodyB, 0);
threadCreate(20, threadBodyC, 0);
}
int threadBodyA(int arg)
{
int myid = threadSelf();
int count = 0;
while(count <= 20) {
count++;
printf("(A%d:%d)", myid, count++);
threadYield();
}
}