Changes between Version 11 and Version 12 of CIVLite


Ignore:
Timestamp:
09/22/23 16:17:18 (3 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CIVLite

    v11 v12  
    8484Example (2-thread barrier):
    8585{{{
     86int %s0 = 0;
     87int %s1 = 0;
    8688
     89fun void t0() {
     90  print "t0 is before the barrier\n";
     91  %s0 = 1;
     92  %s1 -> %s1 = 0;
     93  print "t0 is after the barrier\n";
     94}
     95
     96fun void t1() {
     97  print "t1 is before the barrier\n";
     98  %s0 -> %s0 = 0;
     99  %s1 = 1;
     100  print "t1 is after the barrier\n";
     101}
     102
     103fun void main() {
     104  proc %p0;
     105  proc %p1;
     106  %p0 = spawn t0();
     107  %p1 = spawn t1();
     108  wait %p0;
     109  wait %p1;
     110}
    87111}}}