Changeset 49dee5e


Ignore:
Timestamp:
Jun 21, 2019, 11:47:48 AM (2 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
8d61d620, dc33b5b
Parents:
3aa1d22
Message:

change thread name from Gortn to GoRtn?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/examples/gortn.cfa

    r3aa1d22 r49dee5e  
    1010// Created On       : Wed Feb 20 08:02:37 2019
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb 20 08:35:55 2019
    13 // Update Count     : 3
     12// Last Modified On : Fri Jun 21 08:25:03 2019
     13// Update Count     : 4
    1414//
    1515
     
    1818
    1919struct Msg { int i, j; };
    20 thread Gortn { int i;  float f;  Msg m; };
    21 void ^?{}( Gortn & mutex ) {}
    22 void mem1( Gortn & mutex gortn, int i ) { gortn.i = i; }
    23 void mem2( Gortn & mutex gortn, float f ) { gortn.f = f; }
    24 void mem3( Gortn & mutex gortn, Msg m ) { gortn.m = m; }
     20thread GoRtn { int i;  float f;  Msg m; };
     21void ^?{}( GoRtn & mutex ) {}
     22void mem1( GoRtn & mutex gortn, int i ) { gortn.i = i; }
     23void mem2( GoRtn & mutex gortn, float f ) { gortn.f = f; }
     24void mem3( GoRtn & mutex gortn, Msg m ) { gortn.m = m; }
    2525
    26 void main( Gortn & gortn ) with( gortn ) {
    27         for ( ;; ) {
     26void main( GoRtn & gortn ) with( gortn ) {
     27        for () {
    2828                waitfor( mem1, gortn ) sout | i;
    2929                or waitfor( mem2, gortn ) sout | f;
     
    3333}
    3434int main() {
    35         Gortn gortn;                                                                            // start thread
     35        GoRtn gortn;                                                                            // start thread
    3636        mem1( gortn, 0 );
    3737        mem2( gortn, 2.5 );
Note: See TracChangeset for help on using the changeset viewer.