You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Operazioni sui semafori: sem_wait<br />
• wait su un semaforo<br />
int sem_wait(sem_t *sem)<br />
dove:<br />
• sem: individua il semaforo sul quale operare.<br />
e` la wait di Dijkstra:<br />
‣ se il valore del semaforo e` uguale a zero, sospende il<br />
<strong>thread</strong> chiamante nella coda associata al semaforo;<br />
altrimenti ne decrementa il valore.<br />
M-fosset - Sistemi Operativi 2004-2005