问题/*
* file: main.c
* author: 龙泉居士
* date: 2012-12-22 05:23
*/
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#define NUMBER_OF_THREADS 10
void *print_hello_world (void *tid)
{
printf ("Hello World from thread %d\n", tid);
pthread_exit (NULL);
}
int main (int argc, char *argv[])
{
pthread_t threads[NUMBER_OF_THREADS];
int status, i;
for (i=0; i<NUMBER_OF_THREADS; ++i)
{
printf ("Main Hear, Creating thread %d\n", i);
status = pthread_create (&threads[i], NULL, print_hello_world, (void *)i);
if (sta