Tuesday, March 10, 2009

Posix thread

#include 
#include 
#include 

void my_routine(void * arg)
{
printf("\n hello \n");
}

int main(int argc, char* argv[])
{
pthread_t th;
pthread_attr_t attr;

pthread_attr_init(&attr);

int rc = pthread_create(&th, (void *)&args, (void *)my_routine, NULL);

return 0;
}

No comments: