Advertisement
AbraaoAllysson

fasfdsafas

Apr 12th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. cout<<" executando funcao tarefas - thread= "<< p <<endl;
  2. __sync_fetch_and_add(&arrive[p],1);
  3. cout << " valor de arrive " << p <<" "<< arrive[p] <<" alterado por thread " << endl;
  4. while(proceed[p]==0);
  5. printf("%d sou a thread num=%d e estou na barreira\n",p,p);
  6.  
  7. printf("%d sou a thread num=%d e passei da barreira.\n",p,p);
  8.  
  9. proceed[p] = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement