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
Ringtones Location
15 years ago
2 comments:
wow!! only u can write even movie review in programming language...:)
Post a Comment