Revision dd31cb03 doc/activitydiagrams/core/urtCoreStopNodes.uml

View differences:

doc/activitydiagrams/core/urtCoreStopNodes.uml
33 33
  For normal shutdown ""URT_STATUS_OK"" should be used.
34 34
  ====
35 35
  -- **return** : urt_status_t --
36
  Always returns ""URT_STATUS_OK"".
36
  Returns ""URT_STATUS_OK"" if there was no call with another reason than ""URT_STATUS_OK"" before.
37
  If the function has been called before with a different reason, that reason is returned.
37 38
endnote
38 39

  
39 40
/'### PROCEDURE ##############################################################'/
40 41

  
41 42
start
42 43
:lock core;
43
if (Current ""_status"" value is smaller than specified reason?) then (yes)
44
  :set core's ""_status"" value to argument;
44
if (Current core ""_status"" value is ""URT_STATUS_OK""?) then (yes)
45
  if (Thread priority is lower than ""URT_THREAD_PRIO_HIGH_MAX""?) then (yes)
46
    :boost thread priority to ""URT_THREAD_PRIO_HIGH_MAX"";
47
  else (no)
48
  endif
49
  :set core's ""_status"" variable to argument;
50
  :access first node in core's list of nodes;
51
  while (Current node is not ""NULL""?) is (yes)
52
    :request node to terminate;
53
    :proceed to next node;
54
  endwhile (no)
55
  :broadcast control event (terminate);
56
  :unlock core;
57
  if (Thread boosted its priority?) then (yes)
58
    :reset thread priority;
59
  else (no)
60
  endif
61
  stop
62
  note
63
    Returns ""URT_STATUS_OK"".
64
  endnote
45 65
else (no)
66
  :unlock core;
67
  stop
68
  note
69
    Returns the previously set ""_status"" value.
70
  endnote
46 71
endif
47
:access first node in core's list of nodes;
48
while (Current node is not ""NULL""?) is (yes)
49
  :request node to terminate;
50
  :proceed to next node;
51
endwhile (no)
52
:broadcast control event (terminate);
53
:unlock core;
54
stop
55
note
56
  Returns ""URT_STATUS_OK"".
57
endnote
58 72

  
59 73
/'### OUTRO ##################################################################'/
60 74

  

Also available in: Unified diff