My program contains the line:
makecontext( &threadList[ numThreads ].context, (void (*)(void)) &threadStart, 1, 5);
Where threadStart() is defined as:
static void threadStart(int x){
printf("Yes! Yes! %d\n", x);
}
I thought this should result in the display of "Yes! Yes! 5", but this does not happen. I'm not sure what is happening. I know the line is running, since I have a print statement just below it. Any help is appreciated.