Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. // no inicio .. algures
  2. init(parking, N);
  3. init(choosing, 1);
  4.  
  5.  
  6. // c)
  7. void viatura(void * arg) {
  8. wait(parking); // esperar por lugares livres
  9. wait(choosing); // esperar por poder escolher
  10.  
  11. choose(); // escolher lugar
  12.  
  13. signal(choosing); // assinalar lugar escolhido
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement