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