Ignore:
Timestamp:
Apr 27, 2018, 2:35:00 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, with_gc
Children:
5527759
Parents:
de6319f
Message:

named threads in thread tests
fixed bounded buffer expect
added error check for waitfor with no parameters
added missing parameters to bounded buffer EXT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/concurrent/examples/boundedBufferEXT.c

    rde6319f rb9f383f  
    1 // 
     1//
    22// The contents of this file are covered under the licence agreement in the
    33// file "LICENCE" distributed with Cforall.
    4 // 
    5 // boundedBufferEXT.c -- 
    6 // 
     4//
     5// boundedBufferEXT.c --
     6//
    77// Author           : Peter A. Buhr
    88// Created On       : Wed Apr 18 22:52:12 2018
     
    1010// Last Modified On : Fri Apr 20 22:25:14 2018
    1111// Update Count     : 6
    12 // 
     12//
    1313
    1414#include <stdlib>                                                                               // random
     
    3939forall( otype T )
    4040void insert( Buffer(T) & mutex buffer, T elem ) with( buffer ) {
    41         if ( count == BufferSize ) waitfor( remove );
     41        if ( count == BufferSize ) waitfor( remove, buffer );
    4242        elements[back] = elem;
    4343        back = ( back + 1 ) % BufferSize;
     
    4747forall( otype T )
    4848T remove( Buffer(T) & mutex buffer ) with( buffer ) {
    49         if ( count == 0 ) waitfor( insert );
     49        if ( count == 0 ) waitfor( insert, buffer );
    5050        T elem = elements[front];
    5151        front = ( front + 1 ) % BufferSize;
Note: See TracChangeset for help on using the changeset viewer.