662 lines
47 KiB
HTML
662 lines
47 KiB
HTML
<!-- HTML header for doxygen 1.9.1-->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.15.0"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>L4Re Operating System Framework: Scheduler</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
|
<link href="l4re-awesome.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="L4Re_rgb_logo_quer_hg_h55.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">L4Re Operating System Framework
|
|
</div>
|
|
<div id="projectbrief">Interface and Usage Documentation</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.15.0 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
</script>
|
|
<script type="text/javascript">
|
|
$(function() { codefold.init(); });
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search',true);
|
|
$(function() { init_search(); });
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function(){initNavTree('group__l4__scheduler__api.html','',''); });
|
|
</script>
|
|
<div id="container">
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle"><div class="title">Scheduler <div class="ingroups"><a class="el" href="group__l4__api.html">Base API</a> » <a class="el" href="group__l4__kernel__object__api.html">Kernel Objects</a></div></div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>C interface of the Scheduler kernel object, see <a class="el" href="classL4_1_1Scheduler.html" title="C++ interface of the Scheduler kernel object, see Scheduler for the C interface.">L4::Scheduler</a> for the C++ interface.
|
|
<a href="#details">More...</a></p>
|
|
<div id="dynsection-0" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Collaboration diagram for Scheduler:</div>
|
|
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
|
|
</div>
|
|
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
|
|
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="group__l4__scheduler__api.svg" width="262" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
|
</div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 id="header-nested-classes" class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
|
Data Structures</h2></td></tr>
|
|
<tr class="memitem:l4_5Fsched_5Fcpu_5Fset_5Ft" id="r_l4_5Fsched_5Fcpu_5Fset_5Ft"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structl4__sched__cpu__set__t.html">l4_sched_cpu_set_t</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">CPU sets. <a href="structl4__sched__cpu__set__t.html#details">More...</a><br /></td></tr>
|
|
<tr class="memitem:l4_5Fsched_5Fparam_5Ft" id="r_l4_5Fsched_5Fparam_5Ft"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structl4__sched__param__t.html">l4_sched_param_t</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Scheduler parameter set. <a href="structl4__sched__param__t.html#details">More...</a><br /></td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 id="header-typedef-members" class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
|
Typedefs</h2></td></tr>
|
|
<tr class="memitem:ga865f6c471fd1fd4d5de9bf9c66387c84" id="r_ga865f6c471fd1fd4d5de9bf9c66387c84"><td class="memItemLeft" align="right" valign="top"><a id="ga865f6c471fd1fd4d5de9bf9c66387c84" name="ga865f6c471fd1fd4d5de9bf9c66387c84"></a>
|
|
typedef struct l4_sched_cpu_set_t </td><td class="memItemRight" valign="bottom"><b>l4_sched_cpu_set_t</b></td></tr>
|
|
<tr class="memdesc:ga865f6c471fd1fd4d5de9bf9c66387c84"><td class="mdescLeft"> </td><td class="mdescRight">CPU sets. <br /></td></tr>
|
|
<tr class="memitem:gaf5845ebad6af70f0d0cc49152adad65d" id="r_gaf5845ebad6af70f0d0cc49152adad65d"><td class="memItemLeft" align="right" valign="top"><a id="gaf5845ebad6af70f0d0cc49152adad65d" name="gaf5845ebad6af70f0d0cc49152adad65d"></a>
|
|
typedef struct l4_sched_param_t </td><td class="memItemRight" valign="bottom"><b>l4_sched_param_t</b></td></tr>
|
|
<tr class="memdesc:gaf5845ebad6af70f0d0cc49152adad65d"><td class="mdescLeft"> </td><td class="mdescRight">Scheduler parameter set. <br /></td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 id="header-enum-members" class="groupheader"><a id="enum-members" name="enum-members"></a>
|
|
Enumerations</h2></td></tr>
|
|
<tr class="memitem:ga60f7dd34659eca637a4443d124540dc4" id="r_ga60f7dd34659eca637a4443d124540dc4"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga60f7dd34659eca637a4443d124540dc4">L4_scheduler_classes</a> { <a class="el" href="#gga60f7dd34659eca637a4443d124540dc4a8c77c0ce2d3ba66d14bedee3ec05f68d">L4_SCHEDULER_CLASS_FIXED_PRIO</a> = 1UL << 1
|
|
, <a class="el" href="#gga60f7dd34659eca637a4443d124540dc4a8921c1ebd8e455fd6eb441fceb39f38c">L4_SCHEDULER_CLASS_WFQ</a> = 1UL << 2
|
|
}</td></tr>
|
|
<tr class="memdesc:ga60f7dd34659eca637a4443d124540dc4"><td class="mdescLeft"> </td><td class="mdescRight">Supported scheduler classes. <a href="#ga60f7dd34659eca637a4443d124540dc4">More...</a><br /></td></tr>
|
|
<tr class="memitem:ga0b5a4009c40728ca0326ae9a603a9c0b" id="r_ga0b5a4009c40728ca0326ae9a603a9c0b"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga0b5a4009c40728ca0326ae9a603a9c0b">L4_scheduler_ops</a> { <a class="el" href="#gga0b5a4009c40728ca0326ae9a603a9c0ba7cf4293e84bdc74b2ed7016bd381cabb">L4_SCHEDULER_INFO_OP</a> = 0UL
|
|
, <a class="el" href="#gga0b5a4009c40728ca0326ae9a603a9c0ba02b947c2473e4abce56be3c80a9eac01">L4_SCHEDULER_RUN_THREAD_OP</a> = 1UL
|
|
, <a class="el" href="#gga0b5a4009c40728ca0326ae9a603a9c0ba0f92c789b1f2b6c4fbd1339651561398">L4_SCHEDULER_IDLE_TIME_OP</a> = 2UL
|
|
}</td></tr>
|
|
<tr class="memdesc:ga0b5a4009c40728ca0326ae9a603a9c0b"><td class="mdescLeft"> </td><td class="mdescRight">Operations on the Scheduler object. <a href="#ga0b5a4009c40728ca0326ae9a603a9c0b">More...</a><br /></td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:ga25d36547d6902c482c747b0face8781c" id="r_ga25d36547d6902c482c747b0face8781c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structl4__sched__cpu__set__t.html">l4_sched_cpu_set_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga25d36547d6902c482c747b0face8781c">l4_sched_cpu_set</a> (<a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a> offset, unsigned char granularity, <a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a> map=1) <a class="el" href="group__l4sys__defines.html#ga362dfa378e662dd04f710a23fc7ea931">L4_NOTHROW</a></td></tr>
|
|
<tr class="memitem:ga6a05c8f9abbeb3926c3aff26a4ec1316" id="r_ga6a05c8f9abbeb3926c3aff26a4ec1316"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structl4__msgtag__t.html">l4_msgtag_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga6a05c8f9abbeb3926c3aff26a4ec1316">l4_scheduler_info</a> (<a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a> scheduler, <a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a> *cpu_max, <a class="el" href="structl4__sched__cpu__set__t.html">l4_sched_cpu_set_t</a> *cpus) <a class="el" href="group__l4sys__defines.html#ga362dfa378e662dd04f710a23fc7ea931">L4_NOTHROW</a>))</td></tr>
|
|
<tr class="memdesc:ga6a05c8f9abbeb3926c3aff26a4ec1316"><td class="mdescLeft"> </td><td class="mdescRight">Get scheduler information. <br /></td></tr>
|
|
<tr class="memitem:gaa294eedd2f352bc060b7e16403ccac44" id="r_gaa294eedd2f352bc060b7e16403ccac44"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structl4__msgtag__t.html">l4_msgtag_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#gaa294eedd2f352bc060b7e16403ccac44">l4_scheduler_info_with_classes</a> (<a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a> scheduler, <a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a> *cpu_max, <a class="el" href="structl4__sched__cpu__set__t.html">l4_sched_cpu_set_t</a> *cpus, <a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a> *sched_classes) <a class="el" href="group__l4sys__defines.html#ga362dfa378e662dd04f710a23fc7ea931">L4_NOTHROW</a>))</td></tr>
|
|
<tr class="memdesc:gaa294eedd2f352bc060b7e16403ccac44"><td class="mdescLeft"> </td><td class="mdescRight">Get scheduler information. <br /></td></tr>
|
|
<tr class="memitem:ga97fc9fce99006ce7011a25bb8d014c8d" id="r_ga97fc9fce99006ce7011a25bb8d014c8d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structl4__sched__param__t.html">l4_sched_param_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga97fc9fce99006ce7011a25bb8d014c8d">l4_sched_param</a> (unsigned prio, <a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a> quantum=0) <a class="el" href="group__l4sys__defines.html#ga362dfa378e662dd04f710a23fc7ea931">L4_NOTHROW</a></td></tr>
|
|
<tr class="memdesc:ga97fc9fce99006ce7011a25bb8d014c8d"><td class="mdescLeft"> </td><td class="mdescRight">Construct scheduler parameter. <br /></td></tr>
|
|
<tr class="memitem:ga529821cb75f0c3d17ec66e4357f0f72c" id="r_ga529821cb75f0c3d17ec66e4357f0f72c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structl4__msgtag__t.html">l4_msgtag_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga529821cb75f0c3d17ec66e4357f0f72c">l4_scheduler_run_thread</a> (<a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a> scheduler, <a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a> thread, <a class="el" href="structl4__sched__param__t.html">l4_sched_param_t</a> const *sp) <a class="el" href="group__l4sys__defines.html#ga362dfa378e662dd04f710a23fc7ea931">L4_NOTHROW</a>)</td></tr>
|
|
<tr class="memdesc:ga529821cb75f0c3d17ec66e4357f0f72c"><td class="mdescLeft"> </td><td class="mdescRight">Run a thread on a Scheduler. <br /></td></tr>
|
|
<tr class="memitem:gac5d528967873205c13c35b00bf150b60" id="r_gac5d528967873205c13c35b00bf150b60"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structl4__msgtag__t.html">l4_msgtag_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#gac5d528967873205c13c35b00bf150b60">l4_scheduler_idle_time</a> (<a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a> scheduler, <a class="el" href="structl4__sched__cpu__set__t.html">l4_sched_cpu_set_t</a> const *cpus, <a class="el" href="group__l4__basic__types.html#gab71da24eb7cda2c035f18b862309b101">l4_kernel_clock_t</a> *us) <a class="el" href="group__l4sys__defines.html#ga362dfa378e662dd04f710a23fc7ea931">L4_NOTHROW</a>)</td></tr>
|
|
<tr class="memdesc:gac5d528967873205c13c35b00bf150b60"><td class="mdescLeft"> </td><td class="mdescRight">Query the idle time (in µs) of a CPU. <br /></td></tr>
|
|
<tr class="memitem:ga062a1dfac473eb080c0cdca494c5be8c" id="r_ga062a1dfac473eb080c0cdca494c5be8c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga062a1dfac473eb080c0cdca494c5be8c">l4_scheduler_is_online</a> (<a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a> scheduler, <a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a> cpu) <a class="el" href="group__l4sys__defines.html#ga362dfa378e662dd04f710a23fc7ea931">L4_NOTHROW</a></td></tr>
|
|
<tr class="memdesc:ga062a1dfac473eb080c0cdca494c5be8c"><td class="mdescLeft"> </td><td class="mdescRight">Query if a CPU is online. <br /></td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2>
|
|
<p>C interface of the Scheduler kernel object, see <a class="el" href="classL4_1_1Scheduler.html" title="C++ interface of the Scheduler kernel object, see Scheduler for the C interface.">L4::Scheduler</a> for the C++ interface. </p>
|
|
<p>The Scheduler interface allows a client to manage CPU resources. The API provides functions to query scheduler information, check the online state of CPUs, query CPU idle time and to start threads on defined CPU sets.</p>
|
|
<p>The scheduler offers a virtual device IRQ which triggers when the number of online cores changes, e.g. due to hotplug events. In contrast to hardware IRQs, this IRQ implements a limited functionality:</p><ul>
|
|
<li>Only IRQ line 0 is supported, no MSI vectors.</li>
|
|
<li>The IRQ is edge-triggered and the IRQ mode cannot be changed.</li>
|
|
<li>As the IRQ is edge-triggered, it does not have to be explicitly unmasked.</li>
|
|
</ul>
|
|
<p>It depends on the platform, which hotplug events actually trigger the IRQ. Many platforms only support triggering the IRQ when a CPU core different from the boot CPU goes online.</p>
|
|
<dl class="section user"><dt>Include File</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="scheduler_8h.html">l4/sys/scheduler.h</a>></span> </div>
|
|
<div class="ttc" id="ascheduler_8h_html"><div class="ttname"><a href="scheduler_8h.html">scheduler.h</a></div><div class="ttdoc">Scheduler object functions.</div></div>
|
|
</div><!-- fragment --> </dd></dl>
|
|
<a name="doc-enum-members" id="doc-enum-members"></a><h2 id="header-doc-enum-members" class="groupheader">Enumeration Type Documentation</h2>
|
|
<a id="ga60f7dd34659eca637a4443d124540dc4" name="ga60f7dd34659eca637a4443d124540dc4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga60f7dd34659eca637a4443d124540dc4">◆ </a></span>L4_scheduler_classes</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="#ga60f7dd34659eca637a4443d124540dc4">L4_scheduler_classes</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Supported scheduler classes. </p>
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga60f7dd34659eca637a4443d124540dc4a8c77c0ce2d3ba66d14bedee3ec05f68d" name="gga60f7dd34659eca637a4443d124540dc4a8c77c0ce2d3ba66d14bedee3ec05f68d"></a>L4_SCHEDULER_CLASS_FIXED_PRIO </td><td class="fielddoc"><p>Fixed-priority scheduler. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="gga60f7dd34659eca637a4443d124540dc4a8921c1ebd8e455fd6eb441fceb39f38c" name="gga60f7dd34659eca637a4443d124540dc4a8921c1ebd8e455fd6eb441fceb39f38c"></a>L4_SCHEDULER_CLASS_WFQ </td><td class="fielddoc"><p>Weighted fair queuing scheduler. </p>
|
|
</td></tr>
|
|
</table>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="scheduler_8h_source.html#l00046">46</a> of file <a class="el" href="scheduler_8h_source.html">scheduler.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga0b5a4009c40728ca0326ae9a603a9c0b" name="ga0b5a4009c40728ca0326ae9a603a9c0b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga0b5a4009c40728ca0326ae9a603a9c0b">◆ </a></span>L4_scheduler_ops</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="#ga0b5a4009c40728ca0326ae9a603a9c0b">L4_scheduler_ops</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Operations on the Scheduler object. </p>
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga0b5a4009c40728ca0326ae9a603a9c0ba7cf4293e84bdc74b2ed7016bd381cabb" name="gga0b5a4009c40728ca0326ae9a603a9c0ba7cf4293e84bdc74b2ed7016bd381cabb"></a>L4_SCHEDULER_INFO_OP </td><td class="fielddoc"><p>Query infos about the scheduler. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="gga0b5a4009c40728ca0326ae9a603a9c0ba02b947c2473e4abce56be3c80a9eac01" name="gga0b5a4009c40728ca0326ae9a603a9c0ba02b947c2473e4abce56be3c80a9eac01"></a>L4_SCHEDULER_RUN_THREAD_OP </td><td class="fielddoc"><p>Run a thread on this scheduler. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="gga0b5a4009c40728ca0326ae9a603a9c0ba0f92c789b1f2b6c4fbd1339651561398" name="gga0b5a4009c40728ca0326ae9a603a9c0ba0f92c789b1f2b6c4fbd1339651561398"></a>L4_SCHEDULER_IDLE_TIME_OP </td><td class="fielddoc"><p>Query idle time for the scheduler. </p>
|
|
</td></tr>
|
|
</table>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="scheduler_8h_source.html#l00269">269</a> of file <a class="el" href="scheduler_8h_source.html">scheduler.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Function Documentation</h2>
|
|
<a id="ga25d36547d6902c482c747b0face8781c" name="ga25d36547d6902c482c747b0face8781c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga25d36547d6902c482c747b0face8781c">◆ </a></span>l4_sched_cpu_set()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structl4__sched__cpu__set__t.html">l4_sched_cpu_set_t</a> l4_sched_cpu_set </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a></td> <td class="paramname"><span class="paramname"><em>offset</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned char</td> <td class="paramname"><span class="paramname"><em>granularity</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a></td> <td class="paramname"><span class="paramname"><em>map</em></span><span class="paramdefsep"> = </span><span class="paramdefval">1</span> )</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">offset</td><td>Offset. Must be a multiple of 2^granularity. </td></tr>
|
|
<tr><td class="paramname">granularity</td><td>Granularity in log2 notation. </td></tr>
|
|
<tr><td class="paramname">map</td><td>Bitmap of CPUs, defaults to 1 in C++.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>CPU set. </dd></dl>
|
|
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2sys_2migrate_2thread_migrate_8cc-example.html#a3">examples/sys/migrate/thread_migrate.cc</a>.</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="scheduler_8h_source.html#l00279">279</a> of file <a class="el" href="scheduler_8h_source.html">scheduler.h</a>.</p>
|
|
|
|
<p class="reference">References <a class="el" href="scheduler_8h_source.html#l00072">l4_sched_cpu_set_t::gran_offset</a>, <a class="el" href="compiler_8h_source.html#l00161">L4_NOTHROW</a>, and <a class="el" href="scheduler_8h_source.html#l00077">l4_sched_cpu_set_t::map</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="scheduler_8h_source.html#l00289">l4_sched_param()</a>.</p>
|
|
<div id="dynsection-1" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Here is the caller graph for this function:</div>
|
|
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
|
|
</div>
|
|
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
|
|
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="group__l4__scheduler__api_ga25d36547d6902c482c747b0face8781c_icgraph.svg" width="323" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga97fc9fce99006ce7011a25bb8d014c8d" name="ga97fc9fce99006ce7011a25bb8d014c8d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga97fc9fce99006ce7011a25bb8d014c8d">◆ </a></span>l4_sched_param()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structl4__sched__param__t.html">l4_sched_param_t</a> l4_sched_param </td>
|
|
<td>(</td>
|
|
<td class="paramtype">unsigned</td> <td class="paramname"><span class="paramname"><em>prio</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a></td> <td class="paramname"><span class="paramname"><em>quantum</em></span><span class="paramdefsep"> = </span><span class="paramdefval">0</span> )</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct scheduler parameter. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">prio</td><td>Thread priority (1-255). </td></tr>
|
|
<tr><td class="paramname">quantum</td><td>Timeslice in micro seconds.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>The <a class="el" href="structl4__sched__param__t.html#a051b2b611ddd38deac93e3915d4c1464" title="CPU affinity.">l4_sched_param_t::affinity</a> of the returned value contains all CPUs. </p>
|
|
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2sys_2aliens_2main_8c-example.html#a40">examples/sys/aliens/main.c</a>, <a class="el" href="examples_2sys_2migrate_2thread_migrate_8cc-example.html#a9">examples/sys/migrate/thread_migrate.cc</a>, <a class="el" href="examples_2sys_2singlestep_2main_8c-example.html#a21">examples/sys/singlestep/main.c</a>, <a class="el" href="examples_2sys_2start-with-exc_2main_8c-example.html#a21">examples/sys/start-with-exc/main.c</a>, and <a class="el" href="examples_2sys_2utcb-ipc_2main_8c-example.html#a32">examples/sys/utcb-ipc/main.c</a>.</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="scheduler_8h_source.html#l00289">289</a> of file <a class="el" href="scheduler_8h_source.html">scheduler.h</a>.</p>
|
|
|
|
<p class="reference">References <a class="el" href="scheduler_8h_source.html#l00176">l4_sched_param_t::affinity</a>, <a class="el" href="compiler_8h_source.html#l00161">L4_NOTHROW</a>, <a class="el" href="scheduler_8h_source.html#l00279">l4_sched_cpu_set()</a>, <a class="el" href="scheduler_8h_source.html#l00182">l4_sched_param_t::prio</a>, and <a class="el" href="scheduler_8h_source.html#l00184">l4_sched_param_t::quantum</a>.</p>
|
|
<div id="dynsection-2" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Here is the call graph for this function:</div>
|
|
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
|
|
</div>
|
|
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
|
|
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="group__l4__scheduler__api_ga97fc9fce99006ce7011a25bb8d014c8d_cgraph.svg" width="323" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gac5d528967873205c13c35b00bf150b60" name="gac5d528967873205c13c35b00bf150b60"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gac5d528967873205c13c35b00bf150b60">◆ </a></span>l4_scheduler_idle_time()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structl4__msgtag__t.html">l4_msgtag_t</a> l4_scheduler_idle_time </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a></td> <td class="paramname"><span class="paramname"><em>scheduler</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structl4__sched__cpu__set__t.html">l4_sched_cpu_set_t</a> const *</td> <td class="paramname"><span class="paramname"><em>cpus</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="group__l4__basic__types.html#gab71da24eb7cda2c035f18b862309b101">l4_kernel_clock_t</a> *</td> <td class="paramname"><span class="paramname"><em>us</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Query the idle time (in µs) of a CPU. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">scheduler</td><td>Scheduler object. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">cpus</td><td>Set of CPUs to query. Only the idle time of the first selected CPU in <span class="tt">cpus.map</span> is queried. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">us</td><td>Idle time of queried CPU in µs.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname">0</td><td>Success. </td></tr>
|
|
<tr><td class="paramname">-L4_EINVAL</td><td>Invalid CPU requested in cpu set.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>This function retrieves the idle time in µs of the first selected CPU in <span class="tt">cpus.map</span>. The idle time is the accumulated time a CPU has spent in the idle thread since its last reset. To calculate a load estimate <span class="tt">l</span> one has to retrieve the idle time at the beginning (<span class="tt">i1</span>) and the end (<span class="tt">i2</span>) of a known time interval <span class="tt">t</span>. The load is then calculated as l = 1 - (i2 - i1)/t.</p>
|
|
<p>The idle time is only defined for online CPUs. Reading the idle time from offline CPUs is undefined and may result in either getting -L4_EINVAL or calculating an estimated (incorrect) load of 1.</p>
|
|
<dl class="section note"><dt>Note</dt><dd>The idle time statistics of remote CPUs is updated on context switch events only, hence may not be up-to-date when requested cross-CPU. To get up-to-date idle time you should use a thread running on the same CPU of which the idle time is requested. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="scheduler_8h_source.html#l00403">403</a> of file <a class="el" href="scheduler_8h_source.html">scheduler.h</a>.</p>
|
|
|
|
<p class="reference">References <a class="el" href="compiler_8h_source.html#l00161">L4_NOTHROW</a>, and <a class="el" href="l4_2sys_2utcb_8h_source.html#l00346">l4_utcb()</a>.</p>
|
|
<div id="dynsection-3" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Here is the call graph for this function:</div>
|
|
<div id="dynsection-3-summary" class="dynsummary" style="display:block;">
|
|
</div>
|
|
<div id="dynsection-3-content" class="dyncontent" style="display:none;">
|
|
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="group__l4__scheduler__api_gac5d528967873205c13c35b00bf150b60_cgraph.svg" width="300" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga6a05c8f9abbeb3926c3aff26a4ec1316" name="ga6a05c8f9abbeb3926c3aff26a4ec1316"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga6a05c8f9abbeb3926c3aff26a4ec1316">◆ </a></span>l4_scheduler_info()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structl4__msgtag__t.html">l4_msgtag_t</a> l4_scheduler_info </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a></td> <td class="paramname"><span class="paramname"><em>scheduler</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a> *</td> <td class="paramname"><span class="paramname"><em>cpu_max</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structl4__sched__cpu__set__t.html">l4_sched_cpu_set_t</a> *</td> <td class="paramname"><span class="paramname"><em>cpus</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get scheduler information. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">scheduler</td><td>Scheduler object. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">cpu_max</td><td>Maximum number of CPUs ever available. Optional, can be NULL. </td></tr>
|
|
<tr><td class="paramdir">[in,out]</td><td class="paramname">cpus</td><td><em class="arg">cpus.offset</em> is first CPU of interest. <em class="arg">cpus.granularity</em> (see <a class="el" href="structl4__sched__cpu__set__t.html" title="CPU sets.">l4_sched_cpu_set_t</a>). <em class="arg">cpus.map</em> Bitmap of online CPUs. Must not be NULL.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname">0</td><td>Success. </td></tr>
|
|
<tr><td class="paramname">-L4_ERANGE</td><td>The given CPU offset is larger than the maximum number of CPUs. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="scheduler_8h_source.html#l00381">381</a> of file <a class="el" href="scheduler_8h_source.html">scheduler.h</a>.</p>
|
|
|
|
<p class="reference">References <a class="el" href="compiler_8h_source.html#l00161">L4_NOTHROW</a>, and <a class="el" href="l4_2sys_2utcb_8h_source.html#l00346">l4_utcb()</a>.</p>
|
|
<div id="dynsection-4" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Here is the call graph for this function:</div>
|
|
<div id="dynsection-4-summary" class="dynsummary" style="display:block;">
|
|
</div>
|
|
<div id="dynsection-4-content" class="dyncontent" style="display:none;">
|
|
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="group__l4__scheduler__api_ga6a05c8f9abbeb3926c3aff26a4ec1316_cgraph.svg" width="264" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gaa294eedd2f352bc060b7e16403ccac44" name="gaa294eedd2f352bc060b7e16403ccac44"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gaa294eedd2f352bc060b7e16403ccac44">◆ </a></span>l4_scheduler_info_with_classes()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structl4__msgtag__t.html">l4_msgtag_t</a> l4_scheduler_info_with_classes </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a></td> <td class="paramname"><span class="paramname"><em>scheduler</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a> *</td> <td class="paramname"><span class="paramname"><em>cpu_max</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structl4__sched__cpu__set__t.html">l4_sched_cpu_set_t</a> *</td> <td class="paramname"><span class="paramname"><em>cpus</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a> *</td> <td class="paramname"><span class="paramname"><em>sched_classes</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get scheduler information. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">scheduler</td><td>Scheduler object. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">cpu_max</td><td>Maximum number of CPUs ever available. Optional, can be NULL. </td></tr>
|
|
<tr><td class="paramdir">[in,out]</td><td class="paramname">cpus</td><td><em class="arg">cpus.offset</em> is first CPU of interest. <em class="arg">cpus.granularity</em> (see <a class="el" href="structl4__sched__cpu__set__t.html" title="CPU sets.">l4_sched_cpu_set_t</a>). <em class="arg">cpus.map</em> Bitmap of online CPUs. Must not be NULL. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">sched_classes</td><td>A bitmap of available scheduling classes (see <a class="el" href="#ga60f7dd34659eca637a4443d124540dc4" title="Supported scheduler classes.">L4_scheduler_classes</a>). Optional, can be NULL.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname">0</td><td>Success. </td></tr>
|
|
<tr><td class="paramname">-L4_ERANGE</td><td>The given CPU offset is larger than the maximum number of CPUs.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>This function delivers the same information as <a class="el" href="#ga6a05c8f9abbeb3926c3aff26a4ec1316" title="Get scheduler information.">l4_scheduler_info</a> plus the available scheduler classes (see <a class="el" href="#ga60f7dd34659eca637a4443d124540dc4" title="Supported scheduler classes.">L4_scheduler_classes</a>). </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="scheduler_8h_source.html#l00388">388</a> of file <a class="el" href="scheduler_8h_source.html">scheduler.h</a>.</p>
|
|
|
|
<p class="reference">References <a class="el" href="compiler_8h_source.html#l00161">L4_NOTHROW</a>, and <a class="el" href="l4_2sys_2utcb_8h_source.html#l00346">l4_utcb()</a>.</p>
|
|
<div id="dynsection-5" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Here is the call graph for this function:</div>
|
|
<div id="dynsection-5-summary" class="dynsummary" style="display:block;">
|
|
</div>
|
|
<div id="dynsection-5-content" class="dyncontent" style="display:none;">
|
|
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="group__l4__scheduler__api_gaa294eedd2f352bc060b7e16403ccac44_cgraph.svg" width="299" height="51"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga062a1dfac473eb080c0cdca494c5be8c" name="ga062a1dfac473eb080c0cdca494c5be8c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga062a1dfac473eb080c0cdca494c5be8c">◆ </a></span>l4_scheduler_is_online()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int l4_scheduler_is_online </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a></td> <td class="paramname"><span class="paramname"><em>scheduler</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb">l4_umword_t</a></td> <td class="paramname"><span class="paramname"><em>cpu</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Query if a CPU is online. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">scheduler</td><td>Scheduler object. </td></tr>
|
|
<tr><td class="paramname">cpu</td><td>CPU number whose online status should be queried.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname">true</td><td>The CPU is online. </td></tr>
|
|
<tr><td class="paramname">false</td><td>The CPU is offline </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="scheduler_8h_source.html#l00410">410</a> of file <a class="el" href="scheduler_8h_source.html">scheduler.h</a>.</p>
|
|
|
|
<p class="reference">References <a class="el" href="compiler_8h_source.html#l00161">L4_NOTHROW</a>, and <a class="el" href="l4_2sys_2utcb_8h_source.html#l00346">l4_utcb()</a>.</p>
|
|
<div id="dynsection-6" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Here is the call graph for this function:</div>
|
|
<div id="dynsection-6-summary" class="dynsummary" style="display:block;">
|
|
</div>
|
|
<div id="dynsection-6-content" class="dyncontent" style="display:none;">
|
|
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="group__l4__scheduler__api_ga062a1dfac473eb080c0cdca494c5be8c_cgraph.svg" width="298" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga529821cb75f0c3d17ec66e4357f0f72c" name="ga529821cb75f0c3d17ec66e4357f0f72c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga529821cb75f0c3d17ec66e4357f0f72c">◆ </a></span>l4_scheduler_run_thread()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structl4__msgtag__t.html">l4_msgtag_t</a> l4_scheduler_run_thread </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a></td> <td class="paramname"><span class="paramname"><em>scheduler</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="group__l4__cap__api.html#ga1445e923ce73029130d569d6e69a4dd8">l4_cap_idx_t</a></td> <td class="paramname"><span class="paramname"><em>thread</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structl4__sched__param__t.html">l4_sched_param_t</a> const *</td> <td class="paramname"><span class="paramname"><em>sp</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Run a thread on a Scheduler. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">scheduler</td><td>Scheduler object. </td></tr>
|
|
<tr><td class="paramname">thread</td><td>Capability of the thread to run. </td></tr>
|
|
<tr><td class="paramname">sp</td><td>Scheduling parameters.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname">0</td><td>Success. </td></tr>
|
|
<tr><td class="paramname">-L4_EINVAL</td><td>Invalid size of the scheduling parameter.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>This function launches a thread on a CPU determined by the scheduling parameter <span class="tt">sp.affinity</span>. A thread can be intentionally stopped by migrating it on an offline or an invalid CPU. The thread is only guaranteed to run if the CPU it is migrated to is currently online.</p>
|
|
<dl class="section note"><dt>Note</dt><dd>If the target CPU is currently not online, there is no guarantee that the thread will ever run, even if the CPU comes online later on.</dd>
|
|
<dd>
|
|
A scheduler may impose a policy with regard to selecting CPUs. However the scheduler is required to ensure the following two properties:<ul>
|
|
<li>Two threads with disjoint CPU sets must be scheduled to different CPUs.</li>
|
|
<li>Two threads with identical CPU sets selecting only a single CPU must be scheduled to the same CPU. </li>
|
|
</ul>
|
|
</dd></dl>
|
|
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="examples_2sys_2aliens_2main_8c-example.html#a41">examples/sys/aliens/main.c</a>, <a class="el" href="examples_2sys_2singlestep_2main_8c-example.html#a22">examples/sys/singlestep/main.c</a>, <a class="el" href="examples_2sys_2start-with-exc_2main_8c-example.html#a22">examples/sys/start-with-exc/main.c</a>, and <a class="el" href="examples_2sys_2utcb-ipc_2main_8c-example.html#a33">examples/sys/utcb-ipc/main.c</a>.</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="scheduler_8h_source.html#l00396">396</a> of file <a class="el" href="scheduler_8h_source.html">scheduler.h</a>.</p>
|
|
|
|
<p class="reference">References <a class="el" href="compiler_8h_source.html#l00161">L4_NOTHROW</a>, and <a class="el" href="l4_2sys_2utcb_8h_source.html#l00346">l4_utcb()</a>.</p>
|
|
<div id="dynsection-7" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Here is the call graph for this function:</div>
|
|
<div id="dynsection-7-summary" class="dynsummary" style="display:block;">
|
|
</div>
|
|
<div id="dynsection-7-content" class="dyncontent" style="display:none;">
|
|
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="group__l4__scheduler__api_ga529821cb75f0c3d17ec66e4357f0f72c_cgraph.svg" width="310" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<div id="page-nav" class="page-nav-panel">
|
|
<div id="page-nav-resize-handle"></div>
|
|
<div id="page-nav-tree">
|
|
<div id="page-nav-contents">
|
|
</div><!-- page-nav-contents -->
|
|
</div><!-- page-nav-tree -->
|
|
</div><!-- page-nav -->
|
|
</div><!-- container -->
|
|
<!-- HTML footer for doxygen 1.9.1-->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="footer">Generated on <span class="timestamp"></span> for L4Re Operating System Framework by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.15.0 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|