taskc/signaling/{signaling.alg.c → signaling_3.alg.c} RENAMED
@@ -1,12 +1,19 @@
1
  main:
2
  shared a1_ready := semaphore(0)
 
3
  create_thread(thread_a)
4
  create_thread(thread_b)
 
5
 
6
  thread_a:
7
  statement a1
8
  signal(a1_ready)
9
 
10
  thread_b:
11
  wait(a1_ready)
12
  statement b1
 
 
 
 
 
1
  main:
2
  shared a1_ready := semaphore(0)
3
+ shared b1_ready := semaphore(0)
4
  create_thread(thread_a)
5
  create_thread(thread_b)
6
+ create_thread(thread_c)
7
 
8
  thread_a:
9
  statement a1
10
  signal(a1_ready)
11
 
12
  thread_b:
13
  wait(a1_ready)
14
  statement b1
15
+ signal(b1_ready)
16
+
17
+ thread_c:
18
+ wait(b1_ready)
19
+ statement c1