Constantin Fürst
11 months ago
5 changed files with 204 additions and 1 deletions
-
16thesis/content/50_implementation.tex
-
BINthesis/images/sequenzdiagramm-waitoncompletion.png
-
145thesis/images/sequenzdiagramm-waitoncompletion.xml
-
44thesis/images/structo-cachedata-waitoncompletion.nsd
-
BINthesis/images/structo-cachedata-waitoncompletion.png
After Width: 622 | Height: 322 | Size: 26 KiB |
@ -0,0 +1,145 @@ |
|||
<mxfile host="app.diagrams.net" modified="2024-01-18T16:52:07.664Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" etag="amrg-pTHBEpKrWOlSLRH" version="22.1.21" type="device"> |
|||
<diagram name="Page-1" id="2YBvvXClWsGukQMizWep"> |
|||
<mxGraphModel dx="1533" dy="382" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> |
|||
<root> |
|||
<mxCell id="0" /> |
|||
<mxCell id="1" parent="0" /> |
|||
<mxCell id="aM9ryv3xv72pqoxQDRHE-1" value="CacheData" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;dropTarget=0;collapsible=0;recursiveResize=0;outlineConnect=0;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};" parent="1" vertex="1"> |
|||
<mxGeometry x="40" y="40" width="100" height="300" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="aM9ryv3xv72pqoxQDRHE-2" value="" style="html=1;points=[];perimeter=orthogonalPerimeter;outlineConnect=0;targetShapes=umlLifeline;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};" parent="aM9ryv3xv72pqoxQDRHE-1" vertex="1"> |
|||
<mxGeometry x="45" y="70" width="10" height="210" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="aM9ryv3xv72pqoxQDRHE-5" value="Thread 1" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;dropTarget=0;collapsible=0;recursiveResize=0;outlineConnect=0;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};" parent="1" vertex="1"> |
|||
<mxGeometry x="220" y="40" width="100" height="300" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="aM9ryv3xv72pqoxQDRHE-6" value="" style="html=1;points=[];perimeter=orthogonalPerimeter;outlineConnect=0;targetShapes=umlLifeline;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};" parent="aM9ryv3xv72pqoxQDRHE-5" vertex="1"> |
|||
<mxGeometry x="45" y="80" width="10" height="20" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-28" value="" style="html=1;points=[];perimeter=orthogonalPerimeter;outlineConnect=0;targetShapes=umlLifeline;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};" vertex="1" parent="aM9ryv3xv72pqoxQDRHE-5"> |
|||
<mxGeometry x="45" y="230" width="10" height="20" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="aM9ryv3xv72pqoxQDRHE-9" value="WaitOnCompletion" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;" parent="1" source="aM9ryv3xv72pqoxQDRHE-6" target="aM9ryv3xv72pqoxQDRHE-2" edge="1"> |
|||
<mxGeometry relative="1" as="geometry"> |
|||
<mxPoint x="175" y="160" as="sourcePoint" /> |
|||
<Array as="points"> |
|||
<mxPoint x="190" y="130" /> |
|||
</Array> |
|||
<mxPoint x="100" y="120" as="targetPoint" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-1" value="Thread 2" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;dropTarget=0;collapsible=0;recursiveResize=0;outlineConnect=0;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};" vertex="1" parent="1"> |
|||
<mxGeometry x="340" y="40" width="100" height="300" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-2" value="" style="html=1;points=[];perimeter=orthogonalPerimeter;outlineConnect=0;targetShapes=umlLifeline;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};" vertex="1" parent="RjI6kM-8N4aADmqfwwHL-1"> |
|||
<mxGeometry x="45" y="110" width="10" height="20" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-29" value="" style="html=1;points=[];perimeter=orthogonalPerimeter;outlineConnect=0;targetShapes=umlLifeline;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};" vertex="1" parent="RjI6kM-8N4aADmqfwwHL-1"> |
|||
<mxGeometry x="45" y="260" width="10" height="20" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-3" value="Thread 3" style="shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=0;dropTarget=0;collapsible=0;recursiveResize=0;outlineConnect=0;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};" vertex="1" parent="1"> |
|||
<mxGeometry x="460" y="40" width="100" height="300" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-4" value="" style="html=1;points=[];perimeter=orthogonalPerimeter;outlineConnect=0;targetShapes=umlLifeline;portConstraint=eastwest;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","elbow":"vertical","curved":0,"rounded":0};" vertex="1" parent="RjI6kM-8N4aADmqfwwHL-3"> |
|||
<mxGeometry x="45" y="80" width="10" height="150" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-5" value="WaitOnCompletion" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;" edge="1" parent="1" source="RjI6kM-8N4aADmqfwwHL-2" target="aM9ryv3xv72pqoxQDRHE-2"> |
|||
<mxGeometry relative="1" as="geometry"> |
|||
<mxPoint x="270" y="160" as="sourcePoint" /> |
|||
<Array as="points"> |
|||
<mxPoint x="190" y="160" /> |
|||
</Array> |
|||
<mxPoint x="100" y="160" as="targetPoint" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-10" value="Add Handlers" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;fillColor=#f8cecc;strokeColor=#b85450;" edge="1" parent="1" source="RjI6kM-8N4aADmqfwwHL-4" target="aM9ryv3xv72pqoxQDRHE-2"> |
|||
<mxGeometry relative="1" as="geometry"> |
|||
<mxPoint x="390" y="189.76" as="sourcePoint" /> |
|||
<Array as="points"> |
|||
<mxPoint x="195" y="189.76" /> |
|||
</Array> |
|||
<mxPoint x="100" y="189.76" as="targetPoint" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-12" value="WaitOnCompletion" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;fillColor=#f8cecc;strokeColor=#b85450;" edge="1" parent="1" target="aM9ryv3xv72pqoxQDRHE-2"> |
|||
<mxGeometry relative="1" as="geometry"> |
|||
<mxPoint x="505" y="220.24" as="sourcePoint" /> |
|||
<Array as="points" /> |
|||
<mxPoint x="100" y="220.3809523809524" as="targetPoint" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-15" value="atomic wait on cache update" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> |
|||
<mxGeometry x="-40" y="70" width="90" height="30" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-17" value="" style="endArrow=none;dashed=1;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="RjI6kM-8N4aADmqfwwHL-15"> |
|||
<mxGeometry width="50" height="50" relative="1" as="geometry"> |
|||
<mxPoint x="5" y="340" as="sourcePoint" /> |
|||
<mxPoint x="160" y="200" as="targetPoint" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-19" value="<p style="line-height: 101%;"><br></p>" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" edge="1" parent="1" source="aM9ryv3xv72pqoxQDRHE-2"> |
|||
<mxGeometry x="-0.064" y="80" relative="1" as="geometry"> |
|||
<mxPoint x="90" y="130" as="sourcePoint" /> |
|||
<Array as="points"> |
|||
<mxPoint x="50" y="140" /> |
|||
</Array> |
|||
<mxPoint x="10" y="140" as="targetPoint" /> |
|||
<mxPoint as="offset" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-18" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> |
|||
<mxGeometry y="120" width="10" height="160" as="geometry" /> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-20" value="<p style="line-height: 101%;"><br></p>" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;entryX=1.033;entryY=0.142;entryDx=0;entryDy=0;entryPerimeter=0;fillColor=#dae8fc;strokeColor=#6c8ebf;" edge="1" parent="1"> |
|||
<mxGeometry x="-0.064" y="80" relative="1" as="geometry"> |
|||
<mxPoint x="85" y="170" as="sourcePoint" /> |
|||
<Array as="points"> |
|||
<mxPoint x="50" y="170" /> |
|||
</Array> |
|||
<mxPoint x="10" y="170" as="targetPoint" /> |
|||
<mxPoint as="offset" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-22" value="return" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;dashed=1;" edge="1" parent="1" source="aM9ryv3xv72pqoxQDRHE-2" target="RjI6kM-8N4aADmqfwwHL-4"> |
|||
<mxGeometry relative="1" as="geometry"> |
|||
<mxPoint x="510" y="250.34" as="sourcePoint" /> |
|||
<Array as="points"> |
|||
<mxPoint x="370" y="250" /> |
|||
</Array> |
|||
<mxPoint x="100" y="250.1" as="targetPoint" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-23" value="return" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;dashed=1;" edge="1" parent="1" source="aM9ryv3xv72pqoxQDRHE-2" target="RjI6kM-8N4aADmqfwwHL-28"> |
|||
<mxGeometry relative="1" as="geometry"> |
|||
<mxPoint x="100" y="280" as="sourcePoint" /> |
|||
<Array as="points" /> |
|||
<mxPoint x="270" y="280" as="targetPoint" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-24" value="return T1" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;dashed=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;fillColor=#fff2cc;strokeColor=#d6b656;" edge="1" parent="1" source="RjI6kM-8N4aADmqfwwHL-18" target="aM9ryv3xv72pqoxQDRHE-2"> |
|||
<mxGeometry relative="1" as="geometry"> |
|||
<mxPoint x="15" y="240" as="sourcePoint" /> |
|||
<Array as="points" /> |
|||
<mxPoint x="80" y="240" as="targetPoint" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-26" value="return T2" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;dashed=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;fillColor=#fff2cc;strokeColor=#d6b656;" edge="1" parent="1"> |
|||
<mxGeometry relative="1" as="geometry"> |
|||
<mxPoint x="10" y="270.1" as="sourcePoint" /> |
|||
<Array as="points" /> |
|||
<mxPoint x="85" y="270.1" as="targetPoint" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
<mxCell id="RjI6kM-8N4aADmqfwwHL-27" value="return" style="html=1;verticalAlign=bottom;endArrow=classicThin;edgeStyle=elbowEdgeStyle;elbow=vertical;curved=0;rounded=0;endFill=1;dashed=1;" edge="1" parent="1" source="aM9ryv3xv72pqoxQDRHE-2" target="RjI6kM-8N4aADmqfwwHL-29"> |
|||
<mxGeometry relative="1" as="geometry"> |
|||
<mxPoint x="100" y="310.1" as="sourcePoint" /> |
|||
<Array as="points"> |
|||
<mxPoint x="240" y="310" /> |
|||
</Array> |
|||
<mxPoint x="275" y="310.1" as="targetPoint" /> |
|||
</mxGeometry> |
|||
</mxCell> |
|||
</root> |
|||
</mxGraphModel> |
|||
</diagram> |
|||
</mxfile> |
@ -0,0 +1,44 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<root xmlns:nsd="https://structorizer.fisch.lu" version="3.32-15" preRepeat="until " postFor="to" preReturn="return" postForIn="in" preWhile="while " output="OUTPUT" input="INPUT" preFor="for" preExit="exit" preLeave="leave" ignoreCase="true" preThrow="throw" preForIn="foreach" stepFor="by" namespace="" author="user" created="2024-01-18" changedby="user" changed="2024-01-18" origin="Structorizer 3.32-15" text=""void CacheData::WaitOnCompletion()"" comment="""" color="ffffff" type="program" style="nice"> |
|||
<children> |
|||
<alternative text=""is cache valid (not nullptr)"" comment="""" color="ffffff" disabled="0"> |
|||
<qTrue> |
|||
<instruction text=""return immediately"" comment="""" color="ffffff" rotated="0" disabled="0"></instruction> |
|||
</qTrue> |
|||
<qFalse> |
|||
<while text=""while handlers is not valid (equals nullptr)"" comment="""" color="ffffff" disabled="0"> |
|||
<qWhile> |
|||
<instruction text=""handlers.wait()"" comment="""" color="ffffff" rotated="0" disabled="0"></instruction> |
|||
</qWhile> |
|||
</while> |
|||
<instruction text=""local_handlers <- handlers.exchange(uint64::max)","handlers <- uint64::max"" comment="""" color="ffffff" rotated="0" disabled="0"></instruction> |
|||
<alternative text=""is local_handlers valid (not nullptr and not uint64::max)"" comment="""" color="ffffff" disabled="0"> |
|||
<qTrue> |
|||
<for text=""foreach handler in local_handlers"" comment="""" counterVar="handler" startValue="" stepConst="" style="TRAVERSAL" insep="in" color="ffffff" disabled="0"> |
|||
<qFor> |
|||
<instruction text=""status <- handler.wait()"" comment="""" color="ffffff" rotated="0" disabled="0"></instruction> |
|||
</qFor> |
|||
</for> |
|||
<alternative text=""status contains error"" comment="""" color="ffffff" disabled="0"> |
|||
<qTrue> |
|||
<instruction text=""cache <- source pointer"" comment="""" color="ffffff" rotated="0" disabled="0"></instruction> |
|||
<instruction text=""free(destination pointer)"" comment="""" color="ffffff" rotated="0" disabled="0"></instruction> |
|||
</qTrue> |
|||
<qFalse> |
|||
<instruction text=""cache <- destination pointer"" comment="""" color="ffffff" rotated="0" disabled="0"></instruction> |
|||
</qFalse> |
|||
</alternative> |
|||
<instruction text=""signal threads waiting on cache or handlers"" comment="""" color="ffffff" rotated="0" disabled="0"></instruction> |
|||
</qTrue> |
|||
<qFalse> |
|||
<while text=""while cache is not valid (equals nullptr)"" comment="""" color="ffffff" disabled="0"> |
|||
<qWhile> |
|||
<instruction text=""cache.wait()"" comment="""" color="ffffff" rotated="0" disabled="0"></instruction> |
|||
</qWhile> |
|||
</while> |
|||
</qFalse> |
|||
</alternative> |
|||
</qFalse> |
|||
</alternative> |
|||
</children> |
|||
</root> |
After Width: 739 | Height: 511 | Size: 46 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue