root / doc / design-2.1-lock-acquire.dot @ 2a50e2e8
History | View | Annotate | Download (1003 Bytes)
1 |
digraph "design-2.1-lock-acquire" { |
---|---|
2 |
graph[fontsize=8, fontname="Helvetica"] |
3 |
node[fontsize=8, fontname="Helvetica", width="0", height="0"] |
4 |
edge[fontsize=8, fontname="Helvetica"] |
5 |
|
6 |
/* Actions */ |
7 |
abort[label="Abort\n(couldn't acquire)"] |
8 |
acquire[label="Acquire lock"] |
9 |
add_to_queue[label="Add condition to queue"] |
10 |
wait[label="Wait for notification"] |
11 |
remove_from_queue[label="Remove from queue"] |
12 |
|
13 |
/* Conditions */ |
14 |
alone[label="Empty queue and can acquire?", shape=diamond] |
15 |
have_timeout[label="Do I have timeout?", shape=diamond] |
16 |
top_of_queue_and_can_acquire[ |
17 |
label="On top of queue and can acquire lock?", |
18 |
shape=diamond, |
19 |
] |
20 |
|
21 |
/* Lines */ |
22 |
alone->acquire[label="Yes"] |
23 |
alone->add_to_queue[label="No"] |
24 |
|
25 |
have_timeout->abort[label="Yes"] |
26 |
have_timeout->wait[label="No"] |
27 |
|
28 |
top_of_queue_and_can_acquire->acquire[label="Yes"] |
29 |
top_of_queue_and_can_acquire->have_timeout[label="No"] |
30 |
|
31 |
add_to_queue->wait |
32 |
wait->top_of_queue_and_can_acquire |
33 |
acquire->remove_from_queue |
34 |
} |