Changeset cca568e for tests/concurrent/examples/boundedBufferEXT.cfa
- Timestamp:
- Jan 17, 2020, 3:01:27 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 9e63a2b
- Parents:
- 4a063df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/examples/boundedBufferEXT.cfa
r4a063df rcca568e 10 10 // Created On : Wed Apr 18 22:52:12 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 21 08:19:20 201913 // Update Count : 1 412 // Last Modified On : Thu Jan 16 22:36:34 2020 13 // Update Count : 15 14 14 // 15 15 … … 37 37 38 38 void insert( Buffer(T) & mutex buffer, T elem ) with( buffer ) { 39 if ( count == BufferSize ) waitfor( remove ,buffer );39 if ( count == BufferSize ) waitfor( remove : buffer ); 40 40 elements[back] = elem; 41 41 back = ( back + 1 ) % BufferSize; … … 44 44 45 45 T remove( Buffer(T) & mutex buffer ) with( buffer ) { 46 if ( count == 0 ) waitfor( insert ,buffer );46 if ( count == 0 ) waitfor( insert : buffer ); 47 47 T elem = elements[front]; 48 48 front = ( front + 1 ) % BufferSize;
Note: See TracChangeset
for help on using the changeset viewer.