blob: 7a383dfba2adbef86683459bd91d06ed08a41d6a [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Task &mdash; Apache Mynewt latest documentation</title>
<link rel="shortcut icon" href="../../../_static/mynewt-logo-only-newt32x32.png"/>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/sphinx_theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/bootstrap-3.0.3.min.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/v2.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/restructuredtext.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/overrides.css" type="text/css" />
<link rel="index" title="Index"
href="../../../genindex.html"/>
<link rel="search" title="Search" href="../../../search.html"/>
<link rel="top" title="Apache Mynewt latest documentation" href="../../../index.html"/>
<link rel="up" title="Apache Mynewt Operating System Kernel" href="../mynewt_os.html"/>
<link rel="next" title="Mutex" href="../mutex/mutex.html"/>
<link rel="prev" title="Scheduler" href="../context_switch/context_switch.html"/>
<script src="../../../_static/js/modernizr.min.js"></script>
<script>
(function(i, s, o, g, r, a, m) {
i["GoogleAnalyticsObject"] = r;
(i[r] =
i[r] ||
function() {
(i[r].q = i[r].q || []).push(arguments);
}),
(i[r].l = 1 * new Date());
(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m);
})(window, document, "script", "//www.google-analytics.com/analytics.js", "ga");
ga("create", "UA-72162311-1", "auto");
ga("send", "pageview");
</script>
</head>
<body class="not-front page-documentation" role="document" >
<div id="wrapper">
<div class="container">
<div id="banner" class="row v2-main-banner">
<a class="logo-cell" href="/">
<img class="logo" src="../../../_static/img/logo.png">
</a>
<div class="tagline-cell">
<h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4>
</div>
<div class="news-cell">
<div class="well">
<h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.12.0, Apache NimBLE 1.7.0 </a> released April 4, 2024)
</div>
</div>
</div>
</div>
<header>
<nav id="navbar" class="navbar navbar-inverse" role="navigation">
<div class="container">
<!-- Collapsed navigation -->
<div class="navbar-header">
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav navbar-right">
<li>
<a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a>
</li>
<li class="important">
<a href="/quick-start/">Quick Start</a>
</li>
<li>
<a href="/about/">About</a>
</li>
<li>
<a href="/talks/">Talks</a>
</li>
<li class="active">
<a href="/documentation/">Documentation</a>
</li>
<li>
<a href="/download/">Download</a>
</li>
<li>
<a href="/community/">Community</a>
</li>
<li>
<a href="/events/">Events</a>
</li>
</ul>
<!-- Search, Navigation and Repo links -->
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
</div>
</nav>
</header>
<!-- STARTS MAIN CONTENT -->
<div id="main-content">
<div id="breadcrumb">
<div class="container">
<a href="/documentation/">Docs</a> /
<a href="../../os_user_guide.html">OS User Guide</a> /
<a href="../mynewt_os.html">Apache Mynewt Operating System Kernel</a> /
Task
<div class="sourcelink">
<a href="https://github.com/apache/mynewt-core/edit/master/docs/os/core_os/task/task.rst" class="icon icon-github"
rel="nofollow"> Edit on GitHub</a>
</div>
</div>
</div>
<!-- STARTS CONTAINER -->
<div class="container">
<!-- STARTS .content -->
<div id="content" class="row">
<!-- STARTS .container-sidebar -->
<div class="container-sidebar col-xs-12 col-sm-3">
<div id="docSidebar" class="sticky-container">
<div role="search" class="sphinx-search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search documentation" class="search-documentation" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<!-- Note: only works when deployed -->
<select class="form-control" onchange="if (this.value) window.location.href=this.value">
<option value="/latest" selected>
Version: latest
</option>
<option value="/v1_12_0" >
Version: 1.12.0
</option>
<option value="/v1_11_0" >
Version: 1.11.0
</option>
<option value="/v1_10_0" >
Version: 1.10.0
</option>
<option value="/v1_9_0" selected="selected" >
Version: 1.9.0
</option>
<option value="/v1_8_0" >
Version: 1.8.0
</option>
<option value="/v1_7_0" >
Version: 1.7.0
</option>
<option value="/v1_6_0" >
Version: 1.6.0
</option>
<option value="/v1_5_0" >
Version: 1.5.0
</option>
<option value="/v1_4_0" >
Version: 1.4.0
</option>
<option value="/v1_3_0/os/introduction" >
Version: 1.3.0
</option>
<option value="/v1_2_0/os/introduction" >
Version: 1.2.0
</option>
<option value="/v1_1_0/os/introduction" >
Version: 1.1.0
</option>
<option value="/v1_0_0/os/introduction" >
Version: 1.0.0
</option>
<option value="/v0_9_0/os/introduction" >
Version: 0.9.0
</option>
</select>
<div class="region region-sidebar">
<div class="docs-menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../get_started/index.html">Setup &amp; Get Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../concepts.html">Concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../tutorials/tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../external_links.html">Third-party Resources</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../os_user_guide.html">OS User Guide</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../mynewt_os.html">Kernel</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../context_switch/context_switch.html">Scheduler</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">Task</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mutex/mutex.html">Mutex</a></li>
<li class="toctree-l3"><a class="reference internal" href="../semaphore/semaphore.html">Semaphore</a></li>
<li class="toctree-l3"><a class="reference internal" href="../event_queue/event_queue.html">Event Queues</a></li>
<li class="toctree-l3"><a class="reference internal" href="../callout/callout.html">Callout</a></li>
<li class="toctree-l3"><a class="reference internal" href="../heap/heap.html">Heap</a></li>
<li class="toctree-l3"><a class="reference internal" href="../memory_pool/memory_pool.html">Memory Pools</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mbuf/mbuf.html">Mbufs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../cputime/os_cputime.html">CPU Time</a></li>
<li class="toctree-l3"><a class="reference internal" href="../time/os_time.html">OS Time</a></li>
<li class="toctree-l3"><a class="reference internal" href="../sanity/sanity.html">Sanity</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/system_modules.html">System</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/hal/hal.html">Hardware Abstraction</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/bootloader/bootloader.html">Secure Bootloader</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/split/split.html">Split Images</a></li>
<li class="toctree-l2"><a class="reference internal" href="../porting/port_os.html">Porting Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/baselibc.html">Baselibc</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/drivers/driver.html">Drivers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/devmgmt/newtmgr.html">Device Management with Newt Manager</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/mcumgr/mcumgr.html">Device Management with MCUmgr</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/imgmgr/imgmgr.html">Image Manager</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/sysinitconfig/sysinitconfig.html">Compile-Time Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/sysinitdown/sysinitdown.html">System Initialization and Shutdown</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/extcmd/extcmd.html">Build-Time Hooks</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/fs/fs.html">File System</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/fcb/fcb.html">Flash Circular Buffer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/sensor_framework/sensor_framework.html">Sensor Framework</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/testutil/testutil.html">Test Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/json/json.html">JSON</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../modules/mfg/mfg.html">Manufacturing support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../bsp/index.html">Board support</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../network/index.html">BLE User Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../newt/index.html">Newt Tool Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../newtmgr/index.html">Newt Manager Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mynewt_faq/index.html">Mynewt FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../misc/index.html">Appendix</a></li>
</ul>
</div>
</div>
</div>
<!-- ENDS STICKY CONTAINER -->
</div>
<!-- ENDS .container-sidebar -->
<div class="col-xs-12 col-sm-9">
<div class="alert alert-warning">
<p>
Version 1.9.0 is not the most recent version of the
Apache Mynewt documentation. Click <a href="/latest">here</a> to
read the latest version.
</p>
</div>
<div class="">
<div class="rst-content">
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="task">
<h1>Task<a class="headerlink" href="#task" title="Permalink to this headline"></a></h1>
<p>A task, along with the scheduler, forms the basis of the Mynewt OS. A
task consists of two basic elements: a task stack and a task function.
The task function is basically a forever loop, waiting for some “event”
to wake it up. There are two methods used to signal a task that it has
work to do: event queues and semaphores (see the appropriate manual
sections for descriptions of these features).</p>
<p>The Mynewt OS is a multi-tasking, preemptive OS. Every task is assigned
a task priority (from 0 to 255), with 0 being the highest priority task.
If a higher priority task than the current task wants to run, the
scheduler preempts the currently running task and switches context to
the higher priority task. This is just a fancy way of saying that the
processor stack pointer now points to the stack of the higher priority
task and the task resumes execution where it left off.</p>
<p>Tasks run to completion unless they are preempted by a higher priority
task. The developer must insure that tasks eventually “sleep”; otherwise
lower priority tasks will never get a chance to run (actually, any task
lower in priority than the task that never sleeps). A task will be put
to sleep in the following cases: it puts itself to sleep using
<a class="reference internal" href="../time/os_time.html#c.os_time_delay" title="os_time_delay"><code class="xref c c-func docutils literal notranslate"><span class="pre">os_time_delay()</span></code></a>, it waits on an event queue which is empty or
attempts to obtain a mutex or a semaphore that is currently owned by
another task.</p>
<p>Note that other sections of the manual describe these OS features in
more detail.</p>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<p>In order to create a task two data structures need to be defined: the
task object (struct os_task) and its associated stack. Determining the
stack size can be a bit tricky; generally developers should not declare
large local variables on the stack so that task stacks can be of limited
size. However, all applications are different and the developer must
choose the stack size accordingly. NOTE: be careful when declaring your
stack! The stack is in units of <code class="xref c c-type docutils literal notranslate"><span class="pre">os_stack_t</span></code> sized elements (generally
32-bits). Looking at the example given below and assuming <code class="docutils literal notranslate"><span class="pre">os_stack_t</span></code>
is defined to be a 32-bit unsigned value, “my_task_stack” will use 256
bytes.</p>
<p>A task must also have an associated “task function”. This is the
function that will be called when the task is first run. This task
function should never return!</p>
<p>In order to inform the Mynewt OS of the new task and to have it added to
the scheduler, the <a class="reference internal" href="#c.os_task_init" title="os_task_init"><code class="xref c c-func docutils literal notranslate"><span class="pre">os_task_init()</span></code></a> function is called. Once
<a class="reference internal" href="#c.os_task_init" title="os_task_init"><code class="xref c c-func docutils literal notranslate"><span class="pre">os_task_init()</span></code></a> is called, the task is made ready to run and is added
to the active task list. Note that a task can be initialized (started)
before or after the os has started (i.e. before <code class="xref c c-func docutils literal notranslate"><span class="pre">os_start()</span></code> is
called) but must be initialized after the os has been initialized (i.e.
<code class="xref c c-func docutils literal notranslate"><span class="pre">os_init()</span></code> has been called). In most of the examples and current Mynewt
projects, the os is initialized, tasks are initialized, and the the os
is started. Once the os has started, the highest priority task will be
the first task set to run.</p>
<p>Information about a task can be obtained using the
<a class="reference internal" href="#c.os_task_info_get_next" title="os_task_info_get_next"><code class="xref c c-func docutils literal notranslate"><span class="pre">os_task_info_get_next()</span></code></a> API. Developers can walk the list of tasks
to obtain information on all created tasks. This information is of type
<a class="reference internal" href="#c.os_task_info" title="os_task_info"><code class="xref c c-data docutils literal notranslate"><span class="pre">os_task_info</span></code></a>.</p>
<p>The following is a very simple example showing a single application
task. This task simply toggles an LED at a one second interval.</p>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cm">/* Create a simple &quot;project&quot; with a task that blinks a LED every second */</span>
<span class="cm">/* Define task stack and task object */</span>
<span class="cp">#define MY_TASK_PRI (OS_TASK_PRI_HIGHEST)</span>
<span class="cp">#define MY_STACK_SIZE (64)</span>
<span class="k">struct</span><span class="w"> </span><span class="nc">os_task</span><span class="w"> </span><span class="n">my_task</span><span class="p">;</span>
<span class="n">os_stack_t</span><span class="w"> </span><span class="n">my_task_stack</span><span class="p">[</span><span class="n">MY_STACK_SIZE</span><span class="p">];</span>
<span class="cm">/* This is the task function */</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">my_task_func</span><span class="p">(</span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">arg</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="cm">/* Set the led pin as an output */</span>
<span class="w"> </span><span class="n">hal_gpio_init_out</span><span class="p">(</span><span class="n">LED_BLINK_PIN</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span>
<span class="w"> </span><span class="cm">/* The task is a forever loop that does not return */</span>
<span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="cm">/* Wait one second */</span>
<span class="w"> </span><span class="n">os_time_delay</span><span class="p">(</span><span class="mi">1000</span><span class="p">);</span>
<span class="w"> </span><span class="cm">/* Toggle the LED */</span>
<span class="w"> </span><span class="n">hal_gpio_toggle</span><span class="p">(</span><span class="n">LED_BLINK_PIN</span><span class="p">);</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
<span class="cm">/* This is the main function for the project */</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="cm">/* Perform system and package initialization */</span>
<span class="w"> </span><span class="n">sysinit</span><span class="p">();</span>
<span class="w"> </span><span class="cm">/* Initialize the task */</span>
<span class="w"> </span><span class="n">os_task_init</span><span class="p">(</span><span class="o">&amp;</span><span class="n">my_task</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;my_task&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">my_task_func</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">MY_TASK_PRIO</span><span class="p">,</span>
<span class="w"> </span><span class="n">OS_WAIT_FOREVER</span><span class="p">,</span><span class="w"> </span><span class="n">my_task_stack</span><span class="p">,</span><span class="w"> </span><span class="n">MY_STACK_SIZE</span><span class="p">);</span>
<span class="w"> </span><span class="cm">/* Process events from the default event queue. */</span>
<span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">os_eventq_run</span><span class="p">(</span><span class="n">os_eventq_dflt_get</span><span class="p">());</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="cm">/* main never returns */</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="api">
<h2>API<a class="headerlink" href="#api" title="Permalink to this headline"></a></h2>
<dl class="c enum">
<dt id="c.os_task_state">
<span class="target" id="group___o_s_task_1ga897c47c6381207ebaea3963c43362f88"></span><em class="property"><span class="pre">enum</span> </em><code class="sig-name descname"><span class="pre">os_task_state</span></code><a class="headerlink" href="#c.os_task_state" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task states. </p>
<p><em>Values:</em></p>
<dl class="c enumerator">
<dt id="c.os_task_state.OS_TASK_READY">
<span class="target" id="group___o_s_task_1gga897c47c6381207ebaea3963c43362f88a529cd0e1f131f501efe7cc3d1122d002"></span><em class="property"><span class="pre">enumerator</span> </em><code class="sig-name descname"><span class="pre">OS_TASK_READY</span></code><a class="headerlink" href="#c.os_task_state.OS_TASK_READY" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task is ready to run. </p>
</dd></dl>
<dl class="c enumerator">
<dt id="c.os_task_state.OS_TASK_SLEEP">
<span class="target" id="group___o_s_task_1gga897c47c6381207ebaea3963c43362f88af7cdfa32e836ac0ef16f761a00dd6104"></span><em class="property"><span class="pre">enumerator</span> </em><code class="sig-name descname"><span class="pre">OS_TASK_SLEEP</span></code><a class="headerlink" href="#c.os_task_state.OS_TASK_SLEEP" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task is sleeping. </p>
</dd></dl>
</dd></dl>
<dl class="c type">
<dt id="c.os_task_state_t">
<span class="target" id="group___o_s_task_1ga28ef34455f9ae386a9733210ec92eca5"></span><em class="property"><span class="pre">typedef</span> </em><em class="property"><span class="pre">enum</span></em> <a class="reference internal" href="#c.os_task_state" title="os_task_state"><span class="pre">os_task_state</span></a> <code class="sig-name descname"><span class="pre">os_task_state_t</span></code><a class="headerlink" href="#c.os_task_state_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task states. </p>
</dd></dl>
<dl class="c type">
<dt id="c.os_task_func_t">
<span class="target" id="group___o_s_task_1ga831f9a3ebc7c5e7b4aac94d581eba82c"></span><em class="property"><span class="pre">typedef</span> </em><span class="pre">void</span> <span class="pre">(</span><span class="pre">*</span><code class="sig-name descname"><span class="pre">os_task_func_t</span></code><span class="pre">)</span><span class="sig-paren">(</span><span class="pre">void</span><span class="pre">*</span><span class="sig-paren">)</span><a class="headerlink" href="#c.os_task_func_t" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c function">
<dt id="c.os_task_init">
<span class="target" id="group___o_s_task_1gac0604d800ed8dbfd18835cd5076a6393"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">os_task_init</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="#c.os_task" title="os_task"><span class="pre">os_task</span></a><span class="pre">*</span>, <em class="property"><span class="pre">const</span></em> <span class="pre">char</span><span class="pre">*</span>, <a class="reference internal" href="#c.os_task_func_t" title="os_task_func_t"><span class="pre">os_task_func_t</span></a>, <span class="pre">void</span><span class="pre">*</span>, <span class="pre">uint8_t</span>, <a class="reference internal" href="../time/os_time.html#c.os_time_t" title="os_time_t"><span class="pre">os_time_t</span></a>, <span class="pre">os_stack_t</span><span class="pre">*</span>, <span class="pre">uint16_t</span><span class="sig-paren">)</span><a class="headerlink" href="#c.os_task_init" title="Permalink to this definition"></a><br /></dt>
<dd><p>Initialize a task. </p>
<p>This function initializes the task structure pointed to by t, clearing and setting it’s stack pointer, provides sane defaults and sets the task as ready to run, and inserts it into the operating system scheduler.</p>
<p><dl class="simple">
<dt><strong>Return</strong></dt><dd><p>0 on success, non-zero on failure. </p>
</dd>
<dt><strong>Parameters</strong></dt><dd><ul class="breatheparameterlist simple">
<li><p><code class="docutils literal notranslate"><span class="pre">t</span></code>: The task to initialize </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">name</span></code>: The name of the task to initialize </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">func</span></code>: The task function to call </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">arg</span></code>: The argument to pass to this task function </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">prio</span></code>: The priority at which to run this task </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">sanity_itvl</span></code>: The time at which this task should check in with the sanity task. OS_WAIT_FOREVER means never check in here. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">stack_bottom</span></code>: A pointer to the bottom of a task’s stack </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">stack_size</span></code>: The overall size of the task’s stack.</p></li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="c function">
<dt id="c.os_task_remove">
<span class="target" id="group___o_s_task_1gacf6cfe441ddecead6a2e010165384cb4"></span><span class="pre">int</span> <code class="sig-name descname"><span class="pre">os_task_remove</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="#c.os_task" title="os_task"><span class="pre">os_task</span></a> <span class="pre">*</span><em><span class="pre">t</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.os_task_remove" title="Permalink to this definition"></a><br /></dt>
<dd><p>Removes specified task XXX NOTE: This interface is currently experimental and not ready for common use. </p>
</dd></dl>
<dl class="c function">
<dt id="c.os_task_stacktop_get">
<span class="target" id="group___o_s_task_1ga3f4b0d816068432b8d6538d8f7caf016"></span><span class="pre">os_stack_t</span> <span class="pre">*</span><code class="sig-name descname"><span class="pre">os_task_stacktop_get</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="#c.os_task" title="os_task"><span class="pre">os_task</span></a> <span class="pre">*</span><em><span class="pre">t</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.os_task_stacktop_get" title="Permalink to this definition"></a><br /></dt>
<dd><p>Return pointer to top of stack for given task. </p>
<p><dl class="simple">
<dt><strong>Return</strong></dt><dd><p>pointer to top of stack </p>
</dd>
<dt><strong>Parameters</strong></dt><dd><ul class="breatheparameterlist simple">
<li><p><code class="docutils literal notranslate"><span class="pre">t</span></code>: The task</p></li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="c function">
<dt id="c.os_task_count">
<span class="target" id="group___o_s_task_1ga6b14a4fbff91ab3e9fd4b9933423a590"></span><span class="pre">uint8_t</span> <code class="sig-name descname"><span class="pre">os_task_count</span></code><span class="sig-paren">(</span><span class="pre">void</span><span class="sig-paren">)</span><a class="headerlink" href="#c.os_task_count" title="Permalink to this definition"></a><br /></dt>
<dd><p>Return the number of tasks initialized. </p>
<p><dl class="simple">
<dt><strong>Return</strong></dt><dd><p>number of tasks initialized </p>
</dd>
</dl>
</p>
</dd></dl>
<dl class="c function">
<dt id="c.os_task_info_get_next">
<span class="target" id="group___o_s_task_1gac459b82ad909a99ff1ef0ec3cedc31d2"></span><em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="#c.os_task" title="os_task"><span class="pre">os_task</span></a> <span class="pre">*</span><code class="sig-name descname"><span class="pre">os_task_info_get_next</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">const</span></em> <em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="#c.os_task" title="os_task"><span class="pre">os_task</span></a><span class="pre">*</span>, <em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="#c.os_task_info" title="os_task_info"><span class="pre">os_task_info</span></a><span class="pre">*</span><span class="sig-paren">)</span><a class="headerlink" href="#c.os_task_info_get_next" title="Permalink to this definition"></a><br /></dt>
<dd><p>Iterate through tasks, and return the following information about them: </p>
<p><ul class="simple">
<li><p>Priority</p></li>
<li><p>Task ID</p></li>
<li><p>State (READY, SLEEP)</p></li>
<li><p>Total Stack Usage</p></li>
<li><p>Stack Size</p></li>
<li><p>Context Switch Count</p></li>
<li><p>Runtime</p></li>
<li><p>Last &amp; Next Sanity checkin</p></li>
<li><p>Task Name</p></li>
</ul>
</p>
<p>To get the first task in the list, call <a class="reference internal" href="#group___o_s_task_1gac459b82ad909a99ff1ef0ec3cedc31d2"><span class="std std-ref">os_task_info_get_next()</span></a> with a NULL pointer in the prev argument, and <a class="reference internal" href="#group___o_s_task_1gac459b82ad909a99ff1ef0ec3cedc31d2"><span class="std std-ref">os_task_info_get_next()</span></a> will return a pointer to the task structure, and fill out the <a class="reference internal" href="#structos__task__info"><span class="std std-ref">os_task_info</span></a> structure pointed to by oti.</p>
<p>To get the next task in the list, provide the task structure returned by the previous call to <a class="reference internal" href="#group___o_s_task_1gac459b82ad909a99ff1ef0ec3cedc31d2"><span class="std std-ref">os_task_info_get_next()</span></a>, and <a class="reference internal" href="#group___o_s_task_1gac459b82ad909a99ff1ef0ec3cedc31d2"><span class="std std-ref">os_task_info_get_next()</span></a> will fill out the task structure pointed to by oti again, and return the next task in the list.</p>
<p><dl class="simple">
<dt><strong>Return</strong></dt><dd><p>A pointer to the OS task that has been read, or NULL when finished iterating through all tasks. </p>
</dd>
<dt><strong>Parameters</strong></dt><dd><ul class="breatheparameterlist simple">
<li><p><code class="docutils literal notranslate"><span class="pre">prev</span></code>: The previous task returned by <a class="reference internal" href="#group___o_s_task_1gac459b82ad909a99ff1ef0ec3cedc31d2"><span class="std std-ref">os_task_info_get_next()</span></a>, or NULL to begin iteration. </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">oti</span></code>: The OS task info structure to fill out.</p></li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="c function">
<dt id="c.os_task_info_get">
<span class="target" id="group___o_s_task_1ga1f26f763edd902c31185fa74b596c3f3"></span><span class="pre">void</span> <code class="sig-name descname"><span class="pre">os_task_info_get</span></code><span class="sig-paren">(</span><em class="property"><span class="pre">const</span></em> <em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="#c.os_task" title="os_task"><span class="pre">os_task</span></a> <span class="pre">*</span><em><span class="pre">task</span></em>, <em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="#c.os_task_info" title="os_task_info"><span class="pre">os_task_info</span></a> <span class="pre">*</span><em><span class="pre">oti</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.os_task_info_get" title="Permalink to this definition"></a><br /></dt>
<dd><p>Get following info about specified task. </p>
<p><ul class="simple">
<li><p>Priority</p></li>
<li><p>Task ID</p></li>
<li><p>State (READY, SLEEP)</p></li>
<li><p>Total Stack Usage</p></li>
<li><p>Stack Size</p></li>
<li><p>Context Switch Count</p></li>
<li><p>Runtime</p></li>
<li><p>Last &amp; Next Sanity checkin</p></li>
<li><p>Task Name</p></li>
</ul>
</p>
<p><dl class="simple">
<dt><strong>Parameters</strong></dt><dd><ul class="breatheparameterlist simple">
<li><p><code class="docutils literal notranslate"><span class="pre">task</span></code>: The task to get info about </p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">oti</span></code>: The OS task info structure to fill out. </p></li>
</ul>
</dd>
</dl>
</p>
</dd></dl>
<dl class="c macro">
<dt id="c.OS_TASK_STACK_DEFINE_NOSTATIC">
<span class="target" id="group___o_s_task_1gabae42fd7fe7bd467c4a2489c803455ec"></span><code class="sig-name descname"><span class="pre">OS_TASK_STACK_DEFINE_NOSTATIC</span></code><span class="sig-paren">(</span><em><span class="pre">__name</span></em>, <em><span class="pre">__size</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.OS_TASK_STACK_DEFINE_NOSTATIC" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c macro">
<dt id="c.OS_TASK_STACK_DEFINE">
<span class="target" id="group___o_s_task_1ga78d76568679000a0baf64891f9a44d0c"></span><code class="sig-name descname"><span class="pre">OS_TASK_STACK_DEFINE</span></code><span class="sig-paren">(</span><em><span class="pre">__name</span></em>, <em><span class="pre">__size</span></em><span class="sig-paren">)</span><a class="headerlink" href="#c.OS_TASK_STACK_DEFINE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c macro">
<dt id="c.OS_TASK_PRI_HIGHEST">
<span class="target" id="group___o_s_task_1ga93bc03e4d136b0262c3be351546d90a3"></span><code class="sig-name descname"><span class="pre">OS_TASK_PRI_HIGHEST</span></code><a class="headerlink" href="#c.OS_TASK_PRI_HIGHEST" title="Permalink to this definition"></a><br /></dt>
<dd><p>Highest priority task. </p>
</dd></dl>
<dl class="c macro">
<dt id="c.OS_TASK_PRI_LOWEST">
<span class="target" id="group___o_s_task_1ga3b2c641ef3afd2033ab312b900634cca"></span><code class="sig-name descname"><span class="pre">OS_TASK_PRI_LOWEST</span></code><a class="headerlink" href="#c.OS_TASK_PRI_LOWEST" title="Permalink to this definition"></a><br /></dt>
<dd><p>Lowest priority task. </p>
</dd></dl>
<dl class="c macro">
<dt id="c.OS_TASK_FLAG_NO_TIMEOUT">
<span class="target" id="group___o_s_task_1ga0728b4db08cbfa190ffe8748fe3430bc"></span><code class="sig-name descname"><span class="pre">OS_TASK_FLAG_NO_TIMEOUT</span></code><a class="headerlink" href="#c.OS_TASK_FLAG_NO_TIMEOUT" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c macro">
<dt id="c.OS_TASK_FLAG_SEM_WAIT">
<span class="target" id="group___o_s_task_1ga86f7848c389417413b98191082717d08"></span><code class="sig-name descname"><span class="pre">OS_TASK_FLAG_SEM_WAIT</span></code><a class="headerlink" href="#c.OS_TASK_FLAG_SEM_WAIT" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task waiting on a semaphore. </p>
</dd></dl>
<dl class="c macro">
<dt id="c.OS_TASK_FLAG_MUTEX_WAIT">
<span class="target" id="group___o_s_task_1gaab125531a2394b65d7327c5f09cff689"></span><code class="sig-name descname"><span class="pre">OS_TASK_FLAG_MUTEX_WAIT</span></code><a class="headerlink" href="#c.OS_TASK_FLAG_MUTEX_WAIT" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task waiting on a mutex. </p>
</dd></dl>
<dl class="c macro">
<dt id="c.OS_TASK_FLAG_EVQ_WAIT">
<span class="target" id="group___o_s_task_1ga7886a157f2de8c02484404050fc1c7ac"></span><code class="sig-name descname"><span class="pre">OS_TASK_FLAG_EVQ_WAIT</span></code><a class="headerlink" href="#c.OS_TASK_FLAG_EVQ_WAIT" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task waiting on a event queue. </p>
</dd></dl>
<dl class="c macro">
<dt id="c.OS_TASK_MAX_NAME_LEN">
<span class="target" id="group___o_s_task_1gab9a4544def04dd6cfbaf93cd51785452"></span><code class="sig-name descname"><span class="pre">OS_TASK_MAX_NAME_LEN</span></code><a class="headerlink" href="#c.OS_TASK_MAX_NAME_LEN" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<dl class="c struct">
<dt id="c.os_task_obj">
<span class="target" id="structos__task__obj"></span><em class="property"><span class="pre">struct</span> </em><code class="sig-name descname"><span class="pre">os_task_obj</span></code><a class="headerlink" href="#c.os_task_obj" title="Permalink to this definition"></a><br /></dt>
<dd><em>#include &lt;os_task.h&gt;</em></dd></dl>
<dl class="c struct">
<dt id="c.os_task">
<span class="target" id="structos__task"></span><em class="property"><span class="pre">struct</span> </em><code class="sig-name descname"><span class="pre">os_task</span></code><a class="headerlink" href="#c.os_task" title="Permalink to this definition"></a><br /></dt>
<dd><em>#include &lt;os_task.h&gt;</em><p>Structure containing information about a running task. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-members">Public Members</p>
<dl class="c var">
<dt id="c.os_task.t_stackptr">
<span class="target" id="structos__task_1afe949cfd7c42a5cb31bf8755b26ce01e"></span><span class="pre">os_stack_t</span> <span class="pre">*</span><code class="sig-name descname"><span class="pre">t_stackptr</span></code><a class="headerlink" href="#c.os_task.t_stackptr" title="Permalink to this definition"></a><br /></dt>
<dd><p>Current stack pointer for this task. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_stackbottom">
<span class="target" id="structos__task_1af17f3e2cbf9ce5d5933f43192a676a17"></span><span class="pre">os_stack_t</span> <span class="pre">*</span><code class="sig-name descname"><span class="pre">t_stackbottom</span></code><a class="headerlink" href="#c.os_task.t_stackbottom" title="Permalink to this definition"></a><br /></dt>
<dd><p>Pointer to bottom of this task’s stack. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_stacksize">
<span class="target" id="structos__task_1a732f272fc82004d997f87a9a906729d0"></span><span class="pre">uint16_t</span> <code class="sig-name descname"><span class="pre">t_stacksize</span></code><a class="headerlink" href="#c.os_task.t_stacksize" title="Permalink to this definition"></a><br /></dt>
<dd><p>Size of this task’s stack. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_taskid">
<span class="target" id="structos__task_1a9fbae9501044635c01be92ac56d01b4c"></span><span class="pre">uint8_t</span> <code class="sig-name descname"><span class="pre">t_taskid</span></code><a class="headerlink" href="#c.os_task.t_taskid" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task ID. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_prio">
<span class="target" id="structos__task_1a412fe15c516151b1864e3e77b4d79199"></span><span class="pre">uint8_t</span> <code class="sig-name descname"><span class="pre">t_prio</span></code><a class="headerlink" href="#c.os_task.t_prio" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task Priority. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_flags">
<span class="target" id="structos__task_1af58aa554823b3ae3655b6672d2bf93ca"></span><span class="pre">uint8_t</span> <code class="sig-name descname"><span class="pre">t_flags</span></code><a class="headerlink" href="#c.os_task.t_flags" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task flags, bitmask. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_name">
<span class="target" id="structos__task_1a617c03d12fe7051db4c6b032f4c764a8"></span><em class="property"><span class="pre">const</span></em> <span class="pre">char</span> <span class="pre">*</span><code class="sig-name descname"><span class="pre">t_name</span></code><a class="headerlink" href="#c.os_task.t_name" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task name. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_func">
<span class="target" id="structos__task_1a2a2d6ea1f625cd6a90c6e6f6a5aba160"></span><a class="reference internal" href="#c.os_task_func_t" title="os_task_func_t"><span class="pre">os_task_func_t</span></a> <code class="sig-name descname"><span class="pre">t_func</span></code><a class="headerlink" href="#c.os_task.t_func" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task function that executes. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_arg">
<span class="target" id="structos__task_1a39b3109b30ba2c821cad2cca3dd77fec"></span><span class="pre">void</span> <span class="pre">*</span><code class="sig-name descname"><span class="pre">t_arg</span></code><a class="headerlink" href="#c.os_task.t_arg" title="Permalink to this definition"></a><br /></dt>
<dd><p>Argument to pass to task function when called. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_obj">
<span class="target" id="structos__task_1aa23d60f19ae3e48f859b40cafd83f1ae"></span><span class="pre">void</span> <span class="pre">*</span><code class="sig-name descname"><span class="pre">t_obj</span></code><a class="headerlink" href="#c.os_task.t_obj" title="Permalink to this definition"></a><br /></dt>
<dd><p>Current object task is waiting on, either a semaphore or mutex. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_sanity_check">
<span class="target" id="structos__task_1a24958d799042b17927b0f94405f193cf"></span><em class="property"><span class="pre">struct</span></em> <a class="reference internal" href="../sanity/sanity.html#c.os_sanity_check" title="os_sanity_check"><span class="pre">os_sanity_check</span></a> <code class="sig-name descname"><span class="pre">t_sanity_check</span></code><a class="headerlink" href="#c.os_task.t_sanity_check" title="Permalink to this definition"></a><br /></dt>
<dd><p>Default sanity check for this task. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_next_wakeup">
<span class="target" id="structos__task_1adc9eebeea4dd7cb212de3ee04b113a71"></span><a class="reference internal" href="../time/os_time.html#c.os_time_t" title="os_time_t"><span class="pre">os_time_t</span></a> <code class="sig-name descname"><span class="pre">t_next_wakeup</span></code><a class="headerlink" href="#c.os_task.t_next_wakeup" title="Permalink to this definition"></a><br /></dt>
<dd><p>Next scheduled wakeup if this task is sleeping. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_run_time">
<span class="target" id="structos__task_1a980815aadda46b23373395854907ef0b"></span><a class="reference internal" href="../time/os_time.html#c.os_time_t" title="os_time_t"><span class="pre">os_time_t</span></a> <code class="sig-name descname"><span class="pre">t_run_time</span></code><a class="headerlink" href="#c.os_task.t_run_time" title="Permalink to this definition"></a><br /></dt>
<dd><p>Total task run time. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task.t_ctx_sw_cnt">
<span class="target" id="structos__task_1a0c51f9ebf2d06ec8e3f5bddd860606e1"></span><span class="pre">uint32_t</span> <code class="sig-name descname"><span class="pre">t_ctx_sw_cnt</span></code><a class="headerlink" href="#c.os_task.t_ctx_sw_cnt" title="Permalink to this definition"></a><br /></dt>
<dd><p>Total number of times this task has been context switched during execution. </p>
</dd></dl>
</div>
</dd></dl>
<dl class="c struct">
<dt id="c.os_task_info">
<span class="target" id="structos__task__info"></span><em class="property"><span class="pre">struct</span> </em><code class="sig-name descname"><span class="pre">os_task_info</span></code><a class="headerlink" href="#c.os_task_info" title="Permalink to this definition"></a><br /></dt>
<dd><em>#include &lt;os_task.h&gt;</em><p>Information about an individual task, returned for management APIs. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-members">Public Members</p>
<dl class="c var">
<dt id="c.os_task_info.oti_prio">
<span class="target" id="structos__task__info_1a3b9e108c245f706c1f238639e1fcc411"></span><span class="pre">uint8_t</span> <code class="sig-name descname"><span class="pre">oti_prio</span></code><a class="headerlink" href="#c.os_task_info.oti_prio" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task priority. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task_info.oti_taskid">
<span class="target" id="structos__task__info_1acfc3100a590d117396ba39bdc14c9fe1"></span><span class="pre">uint8_t</span> <code class="sig-name descname"><span class="pre">oti_taskid</span></code><a class="headerlink" href="#c.os_task_info.oti_taskid" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task identifier. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task_info.oti_state">
<span class="target" id="structos__task__info_1a887a2fae644c0d174423ce1724f91a0e"></span><span class="pre">uint8_t</span> <code class="sig-name descname"><span class="pre">oti_state</span></code><a class="headerlink" href="#c.os_task_info.oti_state" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task state, either READY or SLEEP. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task_info.oti_stkusage">
<span class="target" id="structos__task__info_1af660e42807b73fac357753873f89baf0"></span><span class="pre">uint16_t</span> <code class="sig-name descname"><span class="pre">oti_stkusage</span></code><a class="headerlink" href="#c.os_task_info.oti_stkusage" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task stack usage. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task_info.oti_stksize">
<span class="target" id="structos__task__info_1ac306d37cb458c796e7bd876ce3724acc"></span><span class="pre">uint16_t</span> <code class="sig-name descname"><span class="pre">oti_stksize</span></code><a class="headerlink" href="#c.os_task_info.oti_stksize" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task stack size. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task_info.oti_cswcnt">
<span class="target" id="structos__task__info_1a9acbf3e6b3a274ab40951ef54c75ab38"></span><span class="pre">uint32_t</span> <code class="sig-name descname"><span class="pre">oti_cswcnt</span></code><a class="headerlink" href="#c.os_task_info.oti_cswcnt" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task context switch count. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task_info.oti_runtime">
<span class="target" id="structos__task__info_1aeefcf9aeb3aaad24f401d56089842dd8"></span><span class="pre">uint32_t</span> <code class="sig-name descname"><span class="pre">oti_runtime</span></code><a class="headerlink" href="#c.os_task_info.oti_runtime" title="Permalink to this definition"></a><br /></dt>
<dd><p>Task runtime. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task_info.oti_last_checkin">
<span class="target" id="structos__task__info_1a7b5a7274c1237db848cdc04e97f6a715"></span><a class="reference internal" href="../time/os_time.html#c.os_time_t" title="os_time_t"><span class="pre">os_time_t</span></a> <code class="sig-name descname"><span class="pre">oti_last_checkin</span></code><a class="headerlink" href="#c.os_task_info.oti_last_checkin" title="Permalink to this definition"></a><br /></dt>
<dd><p>Last time this task checked in with sanity. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task_info.oti_next_checkin">
<span class="target" id="structos__task__info_1a5f851a446f55aa79f258cab528d10dfe"></span><a class="reference internal" href="../time/os_time.html#c.os_time_t" title="os_time_t"><span class="pre">os_time_t</span></a> <code class="sig-name descname"><span class="pre">oti_next_checkin</span></code><a class="headerlink" href="#c.os_task_info.oti_next_checkin" title="Permalink to this definition"></a><br /></dt>
<dd><p>Next time this task is scheduled to check-in with sanity. </p>
</dd></dl>
<dl class="c var">
<dt id="c.os_task_info.oti_name">
<span class="target" id="structos__task__info_1a100f609783651bcbd369982613570f72"></span><span class="pre">char</span> <code class="sig-name descname"><span class="pre">oti_name</span></code><span class="pre">[</span><code class="sig-name descname"><span class="pre">OS_TASK_MAX_NAME_LEN</span></code><span class="pre">]</span><a class="headerlink" href="#c.os_task_info.oti_name" title="Permalink to this definition"></a><br /></dt>
<dd><p>Name of this task. </p>
</dd></dl>
</div>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="rst-footer-buttons row" role="navigation" aria-label="footer navigation">
<a href="../mutex/mutex.html" class="btn btn-neutral float-right" title="Mutex" accesskey="n">Next: Mutex <span class="fa fa-arrow-circle-right"></span></a>
<a href="../context_switch/context_switch.html" class="btn btn-neutral" title="Scheduler" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous: Scheduler</a>
</div>
</div>
</div>
</div>
<!-- ENDS CONTENT SECTION -->
</div>
<!-- ENDS .content -->
</div>
</div>
<footer>
<div class="container">
<div class="row">
<div class="col-xs-12">
<p class="copyright">Apache Mynewt is available under Apache License, version 2.0.</p>
</div>
<div class="col-xs-12">
<div class="logos">
<img src="../../../_static/img/asf_logo_wide_small.png" alt="Apache" title="Apache">
<small class="footnote">
Apache Mynewt, Mynewt, Apache, the Apache feather logo, and the Apache Mynewt project logo are either
registered trademarks or trademarks of the Apache Software Foundation in the United States and other countries.
</small>
<a href="">
<img src="../../../_static/img/add_to_slack.png" alt="Slack Icon" title="Join our Slack Community" />
</a>
</div>
</div>
</div>
</div>
</footer>
</div>
<!-- ENDS #wrapper -->
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'latest',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
LINK_SUFFIX: '.html'
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../_static/js/bootstrap-3.0.3.min.js"></script>
<script type="text/javascript" src="../../../_static/js/affix.js"></script>
<script type="text/javascript" src="../../../_static/js/main.js"></script>
</body>
</html>