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