#include <stdio.h>
#include <pthread.h>

void * hello (void * arg)
{
	printf ("Hello from : %d\n", *((int *)arg));
	return NULL;
}

void main ()
{
	pthread_t th1, th2;
	int n1 = 1, n2 = 2;
	int status;

	status = pthread_create (&th1, NULL, hello, &n1);
	if (status == -1)
		printf ("Problem th1: %s\n", strerror (status));
	else
		pthread_join (th1, NULL);

	status = pthread_create (&th2, NULL, hello, &n2);
	if (status == -1)
		printf ("Problem th2: %s\n", strerror (status));
	else
		pthread_join (th2, NULL);
}
