1
2
3
4
5
6
7
8
9
10
11
12
main:
shared a1_ready := semaphore(0)
create_thread(thread_a)
create_thread(thread_b)
thread_a:
statement a1
signal(a1_ready)
thread_b:
wait(a1_ready)
statement b1
1
2
3
4
5
6
7
8
9
10
11
12
main:
shared a1_ready := semaphore(0)
create_thread(thread_a)
create_thread(thread_b)
thread_a:
statement a1
signal(a1_ready)
thread_b:
wait(a1_ready)
statement b1