28.11.2014 Views

System call - Processi, thread

System call - Processi, thread

System call - Processi, thread

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Esempio:Operazioni sul buffer<br />

/* Inizializza il buffer */<br />

void init (prodcons *b)<br />

{<br />

p<strong>thread</strong>_mutex_init (&b->lock, NULL);<br />

p<strong>thread</strong>_cond_init (&b->notempty, NULL);<br />

p<strong>thread</strong>_cond_init (&b->notfull, NULL);<br />

b->cont=0;<br />

b->readpos = 0;<br />

b->writepos = 0;<br />

}<br />

M-fosset - Sistemi Operativi 2004-2005

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

Saved successfully!

Ooh no, something went wrong!