/* same as a.ccr in ../1 but vary timing
 * still not that interesting ...
 */
_resource(mutex)
   var xfree := true
_resource_end(mutex)

resource foo()
  process p(i := 1 to 10)
    if i%2 = 0 -> nap(20*i) fi
    _region(mutex,xfree)
      write(i); nap(10+i)
      xfree := false
    _region_end(mutex)
    _region(mutex,true)
      write(i, "done"); nap(i)
      xfree := true
    _region_end(mutex)
  end
end
