28.11.2014 Views

System call - Processi, thread

System call - Processi, thread

System call - Processi, thread

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LinuxThreads: Semafori<br />

• Memoria condivisa: uso dei semafori<br />

(POSIX.1003.1b)<br />

• Semafori: libreria <br />

• sem_init: inizializzazione di un semaforo<br />

• sem_wait: wait<br />

• sem_post: signal<br />

• sem_t : tipo di dato associato al semaforo; esempio:<br />

static sem_t my_sem;<br />

M-fosset - Sistemi Operativi 2004-2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!