#define NUM 100 I64 mp_not_done_flags,grand_total; U0 MPRoutine(CDoc *doc) { I64 i,sum=0, lo=NUM*Gs->num/mp_cnt, //This is how to divide a job hi=NUM*(Gs->num+1)/mp_cnt; for (i=lo;inum,lo,hi-1,sum); lock {grand_total+=sum;} LBtr(&mp_not_done_flags,Gs->num); } U0 Main() { I64 i; grand_total=0; mp_not_done_flags=1<