source:
tags/minix3.1.2a-orig/minix/servers/ss/semaforo.c@
25
Last change on this file since 25 was 13, checked in by , 13 years ago | |
---|---|
File size: 356 bytes |
Line | |
---|---|
1 | #include "semaforo.h" |
2 | |
3 | PUBLIC int accoda(semaforo *ss, int who){ |
4 | if (ss->quanti < MAX_CODA){ |
5 | ss->coda[ss->quanti++] = who; |
6 | return ss->quanti; |
7 | } |
8 | return -1; |
9 | } |
10 | |
11 | PUBLIC int scoda(semaforo *ss){ |
12 | if (ss->quanti > 0){ |
13 | return ss->coda[--ss->quanti]; |
14 | } |
15 | return -1; |
16 | } |
17 | |
18 | |
19 |
Note:
See TracBrowser
for help on using the repository browser.