Last change
on this file since b28ce93 was 0aec496, checked in by Thierry Delisle <tdelisle@…>, 5 years ago |
First attempt at webserver, no option support yet
|
-
Property mode
set to
100644
|
File size:
393 bytes
|
Line | |
---|
1 | #pragma once
|
---|
2 |
|
---|
3 | #include <assert.h>
|
---|
4 | #include <mutex.hfa>
|
---|
5 |
|
---|
6 | // forall(otype T) {
|
---|
7 | struct channel {
|
---|
8 | int * buffer;
|
---|
9 | int front;
|
---|
10 | int back;
|
---|
11 | int count;
|
---|
12 | int size;
|
---|
13 | mutex_lock lock;
|
---|
14 | condition_variable prods;
|
---|
15 | condition_variable cons;
|
---|
16 | };
|
---|
17 |
|
---|
18 | void ?{}( channel & this, int size );
|
---|
19 | void ^?{}( channel & this );
|
---|
20 |
|
---|
21 | void put( channel & this, int elem );
|
---|
22 | int take( channel & this );
|
---|
23 | // }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.