3 p Testing synchronization with semaphores
6 $ ${bindir:=.}/c-synchro-semaphore ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
7 > [ 0.000000] (0:maestro@) Semaphore initialized with capacity = 1
8 > [ 0.000000] (1:Alice@Fafard) Trying to acquire 1 (not blocking)
9 > [ 0.000000] (1:Alice@Fafard) Acquired 1
10 > [ 0.900000] (2:Bob@Fafard) Trying to acquire 1 (blocking)
11 > [ 1.000000] (1:Alice@Fafard) Releasing 2
12 > [ 1.000000] (2:Bob@Fafard) Acquired 1
13 > [ 1.000000] (1:Alice@Fafard) Released 2
14 > [ 2.000000] (2:Bob@Fafard) Releasing 2
15 > [ 2.000000] (2:Bob@Fafard) Released 2
16 > [ 3.000000] (2:Bob@Fafard) Trying to acquire 3 (not blocking)
17 > [ 3.000000] (2:Bob@Fafard) Acquired 3
18 > [ 4.000000] (1:Alice@Fafard) Trying to acquire 3 (blocking)
19 > [ 5.000000] (2:Bob@Fafard) Releasing 4
20 > [ 5.000000] (1:Alice@Fafard) Acquired 3
21 > [ 5.000000] (2:Bob@Fafard) Released 4
22 > [ 7.000000] (2:Bob@Fafard) Trying to acquire 5 (blocking)
23 > [ 10.000000] (1:Alice@Fafard) Releasing 4
24 > [ 10.000000] (2:Bob@Fafard) Timeout.. Try again 5
25 > [ 10.000000] (2:Bob@Fafard) Acquired 5
26 > [ 10.000000] (1:Alice@Fafard) Released 4
27 > [ 10.000000] (2:Bob@Fafard) Releasing 6
28 > [ 10.000000] (2:Bob@Fafard) Released 6
29 > [ 10.000000] (2:Bob@Fafard) Trying to acquire 7 (not blocking)
30 > [ 10.000000] (2:Bob@Fafard) Acquired 7
31 > [ 11.000000] (1:Alice@Fafard) Trying to acquire 5 (blocking)
32 > [ 14.000000] (1:Alice@Fafard) Timeout.. Try again 5
33 > [ 15.000000] (2:Bob@Fafard) Releasing 8
34 > [ 15.000000] (1:Alice@Fafard) Acquired 5
35 > [ 15.000000] (2:Bob@Fafard) Released 8
36 > [ 17.000000] (1:Alice@Fafard) Releasing 6
37 > [ 17.000000] (1:Alice@Fafard) Released 6
38 > [ 22.000000] (1:Alice@Fafard) Trying to acquire 7 (not blocking)
39 > [ 22.000000] (1:Alice@Fafard) Acquired 7
40 > [ 22.000000] (1:Alice@Fafard) Releasing 8
41 > [ 22.000000] (1:Alice@Fafard) Released 8
42 > [ 65.000000] (2:Bob@Fafard) Done
43 > [ 72.000000] (1:Alice@Fafard) Done
44 > [ 72.000000] (0:maestro@) Finished