16.05.2015 Views

Working with the Unix OS

Working with the Unix OS

Working with the Unix OS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Interprocess Communication<br />

/* struct sembuf {<br />

unsigned short sem_nurn;<br />

short sem_op;<br />

short sem_flg;}; */<br />

struct sembuf psernbuf, vsernbuf; /* ops for P and V */<br />

main(int argc, char *argv[])<br />

{<br />

int i, first, second;<br />

short initarray[2], outarray[2];<br />

extern cleanup();<br />

}<br />

if (argc == 1) {<br />

for (i=0; i

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

Saved successfully!

Ooh no, something went wrong!