The world, how it works, surroundings, myself, etc.

Monday, August 14, 2006

11.14 Review

I saw the movie 11.14. Here's how I'd like to review it.

Code:
void* thread0(void* arg)
{
// do something
return arg;
}

void* thread1(void* arg)
{
// do something
return arg;
}
void* thread2(void* arg)
{
// do something
return arg;
}
void* thread3(void* arg)
{
// do something
return arg;
}

int main()
{
pthread_t thread0, thread1, thread2, thread3;
//! Create all threads
pthread_create(&thread0, NULL, thread0, NULL);
pthread_create(&thread1, NULL, thread1, NULL);
pthread_create(&thread2, NULL, thread2, NULL);
pthread_create(&thread3, NULL, thread3, NULL);

//! Join all threads
pthread_join(thread0, NULL);
pthread_join(thread1, NULL);
pthread_join(thread2, NULL);
pthread_join(thread3, NULL);

//! Print time
print gettimeofday();
}

Output:
11:14 PM

2 comments:

Piyush said...
This comment has been removed by a blog administrator.
Piyush said...

wow!! only u can write even movie review in programming language...:)