Jim

hmmm...

No preview for this file type
1 #include <stdio.h> 1 #include <stdio.h>
2 #include <pthread.h> 2 #include <pthread.h>
3 3
4 -int digline[8];  
5 -int i;  
6 void* worker1(void* arg){ 4 void* worker1(void* arg){
7 - 5 +
8 - 6 +
9 while(1){ 7 while(1){
10 8
11 - write (1, "11111111", 9); 9 + write (1, "11111111\n", 9);
  10 + sleep(3);
12 } 11 }
13 - sleep(3);  
14 } 12 }
15 13
16 void* worker2(void* arg){ 14 void* worker2(void* arg){
17 15
18 16
19 while(1){ 17 while(1){
20 - write(1, "22222222", 9); 18 + write(1, "22222222\n", 9);
  19 + sleep(3);
21 } 20 }
22 - sleep(3);  
23 } 21 }
24 22
25 int main(){ 23 int main(){