Statistics
| Branch: | Revision:

urtware / doc / activitydiagrams / request / nrtrequest / urtNrtRequestTryAcquire.svg @ f86427e8

History | View | Annotate | Download (14.192 KB)

1 2d315870 Thomas Schöpping
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="470px" preserveAspectRatio="none" style="width:1030px;height:470px;" version="1.1" viewBox="0 0 1030 470" width="1030px" zoomAndPan="magnify"><defs><filter height="300%" id="fneps8iee7k82" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="469.5" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="239" x="394.5" y="47.6611">urtNrtRequestTryAcquire()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="517" y="68.6143"/><path d="M437,72.8594 L437,198.7891 L1018,198.7891 L1018,82.8594 L1008,72.8594 L437,72.8594 " fill="#FBFB77" filter="url(#fneps8iee7k82)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M1008,72.8594 L1008,82.8594 L1018,82.8594 L1008,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="437" x2="633.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="637.5" y="89.4263"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="57" x="637.5" y="89.4263">request</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="119" x="698.5" y="89.4263">: urt_nrtrequest_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="821.5" x2="1018" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="205" x="443" y="105.0591">The NRT request to be acquired.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="443" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="523" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="555" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="437" x2="1018" y1="128.2578" y2="128.2578"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="437" x2="1018" y1="130.2578" y2="130.2578"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="437" x2="656.5" y1="140.8242" y2="140.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="660.5" y="144.8247"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="660.5" y="144.8247">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="85" x="709.5" y="144.8247">: urt_status_t</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="798.5" x2="1018" y1="140.8242" y2="140.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="443" y="160.4575">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="496" y="160.4575">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="120" x="604" y="160.4575">in case of success.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="443" y="175.5903">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="216" x="496" y="175.5903">URT_STATUS_REQUEST_BADOWNER</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="287" x="716" y="175.5903">if the request is aloready owned by a service.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="443" y="190.7231">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="200" x="496" y="190.7231">URT_STATUS_REQUEST_LOCKED</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="254" x="700" y="190.7231">if the request's mutex is already locked.</text><ellipse cx="727.5" cy="228.7891" fill="#000000" filter="url(#fneps8iee7k82)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><path d="M538.5,263.207 L538.5,288.3398 A0,0 0 0 0 538.5,288.3398 L658.5,288.3398 A0,0 0 0 0 658.5,288.3398 L658.5,281.207 L678.5,275.7734 L658.5,273.207 L658.5,273.207 L648.5,263.207 L538.5,263.207 A0,0 0 0 0 538.5,263.207 " fill="#FBFB77" filter="url(#fneps8iee7k82)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M648.5,263.207 L648.5,273.207 L658.5,273.207 L648.5,263.207 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="99" x="544.5" y="280.2739">Does not block.</text><rect fill="#FEFECE" filter="url(#fneps8iee7k82)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="98" x="678.5" y="258.7891"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="78" x="688.5" y="279.9277">lock request</text><polygon fill="#FEFECE" filter="url(#fneps8iee7k82)" points="655.5,312.7578,799.5,312.7578,811.5,324.7578,799.5,336.7578,655.5,336.7578,643.5,324.7578,655.5,312.7578" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="144" x="655.5" y="328.5659">Request could be locked?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="623.5" y="322.1636">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="811.5" y="322.1636">no</text><polygon fill="#FEFECE" filter="url(#fneps8iee7k82)" points="390,346.7578,570,346.7578,582,358.7578,570,370.7578,390,370.7578,378,358.7578,390,346.7578" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="180" x="390" y="362.5659">Request is owned by a service?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="358" y="356.1636">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="582" y="356.1636">no</text><rect fill="#FEFECE" filter="url(#fneps8iee7k82)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="114" x="278" y="380.7578"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="94" x="288" y="401.8965">unlock request</text><path d="M10,433.1602 L10,458.293 A0,0 0 0 0 10,458.293 L304,458.293 A0,0 0 0 0 304,458.293 L304,451.1602 L324,445.7266 L304,443.1602 L304,443.1602 L294,433.1602 L10,433.1602 A0,0 0 0 0 10,433.1602 " fill="#FBFB77" filter="url(#fneps8iee7k82)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M294,433.1602 L294,443.1602 L304,443.1602 L294,433.1602 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="16" y="450.2271">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="216" x="69" y="450.2271">URT_STATUS_REQUEST_BADOWNER</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="285" y="450.2271">.</text><ellipse cx="335" cy="445.7266" fill="#FFFFFF" filter="url(#fneps8iee7k82)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="335" cy="445.7266" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><path d="M412,380.7578 L412,405.8906 A0,0 0 0 0 412,405.8906 L594,405.8906 A0,0 0 0 0 594,405.8906 L594,398.7578 L614,393.3242 L594,390.7578 L594,390.7578 L584,380.7578 L412,380.7578 A0,0 0 0 0 412,380.7578 " fill="#FBFB77" filter="url(#fneps8iee7k82)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M584,380.7578 L584,390.7578 L594,390.7578 L584,380.7578 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="418" y="397.8247">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="471" y="397.8247">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="575" y="397.8247">.</text><ellipse cx="625" cy="393.3242" fill="#FFFFFF" filter="url(#fneps8iee7k82)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="625" cy="393.3242" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><path d="M666,346.7578 L666,371.8906 A0,0 0 0 0 666,371.8906 L944,371.8906 A0,0 0 0 0 944,371.8906 L944,364.7578 L964,359.3242 L944,356.7578 L944,356.7578 L934,346.7578 L666,346.7578 A0,0 0 0 0 666,346.7578 " fill="#FBFB77" filter="url(#fneps8iee7k82)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M934,346.7578 L934,356.7578 L944,356.7578 L934,346.7578 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="672" y="363.8247">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="200" x="725" y="363.8247">URT_STATUS_REQUEST_LOCKED</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="925" y="363.8247">.</text><ellipse cx="975" cy="359.3242" fill="#FFFFFF" filter="url(#fneps8iee7k82)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="975" cy="359.3242" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="727.5" x2="727.5" y1="198.7891" y2="218.7891"/><polygon fill="#A80036" points="723.5,208.7891,727.5,218.7891,731.5,208.7891,727.5,212.7891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="727.5" x2="727.5" y1="238.7891" y2="258.7891"/><polygon fill="#A80036" points="723.5,248.7891,727.5,258.7891,731.5,248.7891,727.5,252.7891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="335" x2="335" y1="414.7266" y2="434.7266"/><polygon fill="#A80036" points="331,424.7266,335,434.7266,339,424.7266,335,428.7266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="378" x2="335" y1="358.7578" y2="358.7578"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="335" x2="335" y1="358.7578" y2="380.7578"/><polygon fill="#A80036" points="331,370.7578,335,380.7578,339,370.7578,335,374.7578" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="582" x2="625" y1="358.7578" y2="358.7578"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="625" x2="625" y1="358.7578" y2="382.3242"/><polygon fill="#A80036" points="621,372.3242,625,382.3242,629,372.3242,625,376.3242" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="643.5" x2="480" y1="324.7578" y2="324.7578"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="480" x2="480" y1="324.7578" y2="346.7578"/><polygon fill="#A80036" points="476,336.7578,480,346.7578,484,336.7578,480,340.7578" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="811.5" x2="975" y1="324.7578" y2="324.7578"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="975" x2="975" y1="324.7578" y2="348.3242"/><polygon fill="#A80036" points="971,338.3242,975,348.3242,979,338.3242,975,342.3242" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="727.5" x2="727.5" y1="292.7578" y2="312.7578"/><polygon fill="#A80036" points="723.5,302.7578,727.5,312.7578,731.5,302.7578,727.5,306.7578" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[68d9a4e98a4e86240b3d814863a027ed]
2
@startuml
3
4
title **µRtWare**\nurtNrtRequestTryAcquire()\n
5
6
7
8
9
10
11
note
12
  - - **request** : urt_nrtrequest_t* - -
13
  The NRT request to be acquired.
14
  Must not be ""NULL"".
15
  ====
16
  - - **return** : urt_status_t - -
17
  Returns ""URT_STATUS_OK"" in case of success.
18
  Returns ""URT_STATUS_REQUEST_BADOWNER"" if the request is aloready owned by a service.
19
  Returns ""URT_STATUS_REQUEST_LOCKED"" if the request's mutex is already locked.
20
endnote
21
22
23
  start
24
  :lock request;
25
  note
26
    Does not block.
27
  endnote
28
  if (Request could be locked?) then (yes)
29
    if (Request is owned by a service?) then (yes)
30
      :unlock request;
31
      stop
32
      note
33
        Returns ""URT_STATUS_REQUEST_BADOWNER"".
34
      endnote
35
    else (no)
36
      stop
37
      note
38
        Returns ""URT_STATUS_OK"".
39
      endnote
40
    endif
41
  else (no)
42
    stop
43
    note
44
      Returns ""URT_STATUS_REQUEST_LOCKED"".
45
    endnote
46
  endif
47
48
49
@enduml
50
51
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
52
(GPL source distribution)
53
Java Runtime: OpenJDK Runtime Environment
54
JVM: OpenJDK 64-Bit Server VM
55
Java Version: 11.0.7+10-post-Ubuntu-2ubuntu218.04
56
Operating System: Linux
57
Default Encoding: UTF-8
58
Language: en
59
Country: US
60
--></g></svg>