/* file: mythread_simple.cpp * */ #include #include #include #define NUM_THREADS 5 #ifndef PTHREAD_STACK_MIN #define PTHREAD_STACK_MIN 10000 #endif void *PrintHello (void *threadid) { printf("\n%d: hello world!\n",threadid); pthread_exit(NULL); } int main (int argc, char * argv[]) { printf ("Starting main now\n"); int number_threads; if (argc>1) { number_threads=atoi(argv[1]); } else { number_threads = NUM_THREADS; } pthread_t threads[number_threads]; pthread_attr_t attr; int rc , t; for ( t=0;t