Last change
on this file was db09685, checked in by Peter A. Buhr <pabuhr@…>, 5 weeks ago |
more change type name condition_variable to cond_lock
|
-
Property mode
set to
100644
|
File size:
376 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 | cond_lock prods;
|
---|
15 | cond_lock 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.