]> begriffs open source - cmsis/blob - main/RTOS2/html/group__rtos__process__isolation__thread__wdt.html
Update documentation for branch main
[cmsis] / main / RTOS2 / html / group__rtos__process__isolation__thread__wdt.html
1 <!-- HTML header for doxygen 1.9.6-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
4 <head>
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=11"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>CMSIS-RTOS2: Thread Watchdogs</title>
9 <link href="doxygen.css" rel="stylesheet" type="text/css"/>
10 <link href="tabs.css" rel="stylesheet" type="text/css"/>
11 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
12 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
13 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
14 <script type="text/javascript" src="jquery.js"></script>
15 <script type="text/javascript" src="dynsections.js"></script>
16 <script type="text/javascript" src="printComponentTabs.js"></script>
17 <script type="text/javascript" src="footer.js"></script>
18 <script type="text/javascript" src="navtree.js"></script>
19 <link href="navtree.css" rel="stylesheet" type="text/css"/>
20 <script type="text/javascript" src="resize.js"></script>
21 <script type="text/javascript" src="navtreedata.js"></script>
22 <script type="text/javascript" src="navtree.js"></script>
23 <link href="search/search.css" rel="stylesheet" type="text/css"/>
24 <script type="text/javascript" src="search/searchdata.js"></script>
25 <script type="text/javascript" src="search/search.js"></script>
26 <script type="text/javascript">
27 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
28   $(document).ready(function() { init_search(); });
29 /* @license-end */
30 </script>
31 <script type="text/javascript" src="darkmode_toggle.js"></script>
32 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
33 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
34 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
35 <link href="version.css" rel="stylesheet" type="text/css" />
36 <script type="text/javascript" src="../../version.js"></script>
37 </head>
38 <body>
39 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
40 <div id="titlearea">
41 <table cellspacing="0" cellpadding="0">
42  <tbody>
43  <tr style="height: 55px;">
44   <td id="projectlogo" style="padding: 1.5em;"><img alt="Logo" src="cmsis_logo_white_small.png"/></td>
45   <td style="padding-left: 1em; padding-bottom: 1em;padding-top: 1em;">
46    <div id="projectname">CMSIS-RTOS2
47    &#160;<span id="projectnumber"><script type="text/javascript">
48      <!--
49      writeHeader.call(this);
50      writeVersionDropdown.call(this, "CMSIS-RTOS2");
51      //-->
52     </script>
53    </span>
54    </div>
55    <div id="projectbrief">Real-Time Operating System: API and RTX Reference Implementation</div>
56   </td>
57    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
58         <span class="left">
59           <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
60           <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
61                onfocus="searchBox.OnSearchFieldFocus(true)" 
62                onblur="searchBox.OnSearchFieldFocus(false)" 
63                onkeyup="searchBox.OnSearchFieldChange(event)"/>
64           </span><span class="right">
65             <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
66           </span>
67         </div>
68 </td>
69   <!--END !PROJECT_NAME-->
70  </tr>
71  </tbody>
72 </table>
73 </div>
74 <!-- end header part -->
75 <div id="CMSISnav" class="tabs1">
76   <ul class="tablist">
77     <script type="text/javascript">
78       writeComponentTabs.call(this);
79     </script>
80   </ul>
81 </div>
82 <!-- Generated by Doxygen 1.9.6 -->
83 <script type="text/javascript">
84 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
85 var searchBox = new SearchBox("searchBox", "search/",'.html');
86 /* @license-end */
87 </script>
88 </div><!-- top -->
89 <div id="side-nav" class="ui-resizable side-nav-resizable">
90   <div id="nav-tree">
91     <div id="nav-tree-contents">
92       <div id="nav-sync" class="sync"></div>
93     </div>
94   </div>
95   <div id="splitbar" style="-moz-user-select:none;" 
96        class="ui-resizable-handle">
97   </div>
98 </div>
99 <script type="text/javascript">
100 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
101 $(document).ready(function(){initNavTree('group__rtos__process__isolation__thread__wdt.html',''); initResizable(); });
102 /* @license-end */
103 </script>
104 <div id="doc-content">
105 <!-- window showing the filter options -->
106 <div id="MSearchSelectWindow"
107      onmouseover="return searchBox.OnSearchSelectShow()"
108      onmouseout="return searchBox.OnSearchSelectHide()"
109      onkeydown="return searchBox.OnSearchSelectKey(event)">
110 </div>
111
112 <!-- iframe showing the search results (closed by default) -->
113 <div id="MSearchResultsWindow">
114 <div id="MSearchResults">
115 <div class="SRPage">
116 <div id="SRIndex">
117 <div id="SRResults"></div>
118 <div class="SRStatus" id="Loading">Loading...</div>
119 <div class="SRStatus" id="Searching">Searching...</div>
120 <div class="SRStatus" id="NoMatches">No Matches</div>
121 </div>
122 </div>
123 </div>
124 </div>
125
126 <div class="header">
127   <div class="headertitle"><div class="title">Thread Watchdogs<div class="ingroups"><a class="el" href="group__CMSIS__RTOS.html">CMSIS-RTOS API v2</a> &raquo; <a class="el" href="group__CMSIS__RTOS__ProcessIsolation.html">Process Isolation</a></div></div></div>
128 </div><!--header-->
129 <div class="contents">
130 <p>CMSIS-RTOS defines <b>Thread Watchdogs</b> that allow to control timing constraints for thread execution (<a href="https://en.wikipedia.org/wiki/Temporal_isolation" target="_blank"><b>temporal isolation</b></a>).</p>
131 <p>Each thread has an independent watchdog timer that is started with the function <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga8f4455b06afb95c1915f15266818a8c6">osThreadFeedWatchdog(uint32_t ticks)</a>. The <span class="XML-Token">ticks</span> value specifies the timeout before it expires. Within this time interval the function <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga8f4455b06afb95c1915f15266818a8c6">osThreadFeedWatchdog</a> must be called again within the thread to restart the watchdog timer.</p>
132 <p>If the thread watchdog is not restarted during the specified amount of ticks the Watchdog Alarm callback <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga5a02770aaf65c7a3c7562c109884176a">osWatchdogAlarm_Handler(osThreadId_t thread_id)</a> is triggered and can be used to recover the system or proceed to the system shutdown.</p>
133 <p>Figure below explains the concept with an example:</p>
134 <div class="image">
135 <img src="thread_watchdogs.png" alt=""/>
136 <div class="caption">
137 Example use of Thread Watchdogs</div></div>
138 <p><a class="el" href="group__rtos__process__isolation__faults.html">Fault Handling</a> provides more details on the available possibilities for system recovery. </p><dl class="section note"><dt>Note</dt><dd>If the application suspends a thread from scheduling by calling <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaa9de419d0152bf77e9bbcd1f369fb990">osThreadSuspend</a> or <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gadadb56627094dbb07f6aeddf7d713fd9">osThreadSuspendClass</a>, the thread watchdog still continues to run, and it is expected to expire and trigger <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga5a02770aaf65c7a3c7562c109884176a">osWatchdogAlarm_Handler</a> because the thread will not be serviced as expected. </dd>
139 <dd>
140 Hence it may be necessary to differentiate handling of thread watchdogs that expired unexpectedly from the thread watchdog alarms of intentionally suspended threads.</dd></dl>
141 <h1><a class="anchor" id="rtos_process_isolation_thread_wdt_refs"></a>
142 Function references</h1>
143 <p>Summary of functions that implement thread watchdog functionality</p>
144 <ul>
145 <li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga8f4455b06afb95c1915f15266818a8c6">osThreadFeedWatchdog</a> :  Feed watchdog of the current running thread.  </li>
146 <li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga5a02770aaf65c7a3c7562c109884176a">osWatchdogAlarm_Handler</a> :  Handler for expired thread watchdogs.   </li>
147 </ul>
148 </div><!-- contents -->
149 </div><!-- doc-content -->
150 <!-- start footer part -->
151 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
152   <ul>
153     <li class="footer">
154       <script type="text/javascript">
155         <!--
156         writeFooter.call(this);
157         //-->
158       </script> 
159     </li>
160   </ul>
161 </div>
162 </body>
163 </html>