Sat Jan 03, 2009 5:24 pm
//dispatcher
pthread_cond_signal(&cond)
//thread1
while (letMeWork == 0) {
puts("COMPRESSOR BLOCKED");
pthread_cond_wait(&cond, &mutex)
}
printf("[COMPRESSOR]");
//thread2
while (letMeWork == 0) {
puts("ENCRYPTOR BLOCKED");
pthread_cond_wait(&cond, &mutex)
}
printf("[ENCRYPTOR]");
...
Sat Jan 03, 2009 6:02 pm
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.