http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/context_switch/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/context_switch/index.html b/develop/os/core_os/context_switch/context_switch/index.html index f918a88..a8fe4a3 100644 --- a/develop/os/core_os/context_switch/context_switch/index.html +++ b/develop/os/core_os/context_switch/context_switch/index.html @@ -738,6 +738,10 @@ <td>Inform scheduler that OS time has moved forward.</td> </tr> <tr> +<td><a href="../os_sched_remove/">os_sched_remove</a></td> +<td>Stops a task and removes it from all the OS task lists.</td> +</tr> +<tr> <td><a href="../os_sched_resort/">os_sched_resort</a></td> <td>Inform scheduler that the priority of the given task has changed and the <em>ready to run</em> list should be re-sorted.</td> </tr>
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_arch_ctx_sw/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_arch_ctx_sw/index.html b/develop/os/core_os/context_switch/os_arch_ctx_sw/index.html index 1d5aee8..0dd1d77 100644 --- a/develop/os/core_os/context_switch/os_arch_ctx_sw/index.html +++ b/develop/os/core_os/context_switch/os_arch_ctx_sw/index.html @@ -344,6 +344,14 @@ <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + + <li > <a href="../os_sched_resort/">os_sched_resort</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched/index.html b/develop/os/core_os/context_switch/os_sched/index.html index 7e2e288..e0b7b05 100644 --- a/develop/os/core_os/context_switch/os_sched/index.html +++ b/develop/os/core_os/context_switch/os_sched/index.html @@ -344,6 +344,14 @@ <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + + <li > <a href="../os_sched_resort/">os_sched_resort</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched_ctx_sw_hook/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched_ctx_sw_hook/index.html b/develop/os/core_os/context_switch/os_sched_ctx_sw_hook/index.html index c57d0c9..d17d5c3 100644 --- a/develop/os/core_os/context_switch/os_sched_ctx_sw_hook/index.html +++ b/develop/os/core_os/context_switch/os_sched_ctx_sw_hook/index.html @@ -344,6 +344,14 @@ <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + + <li > <a href="../os_sched_resort/">os_sched_resort</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched_get_current_task/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched_get_current_task/index.html b/develop/os/core_os/context_switch/os_sched_get_current_task/index.html index 4bac204..62b53f5 100644 --- a/develop/os/core_os/context_switch/os_sched_get_current_task/index.html +++ b/develop/os/core_os/context_switch/os_sched_get_current_task/index.html @@ -344,6 +344,14 @@ <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + + <li > <a href="../os_sched_resort/">os_sched_resort</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched_insert/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched_insert/index.html b/develop/os/core_os/context_switch/os_sched_insert/index.html index 9b5c20e..0cf0488 100644 --- a/develop/os/core_os/context_switch/os_sched_insert/index.html +++ b/develop/os/core_os/context_switch/os_sched_insert/index.html @@ -344,6 +344,14 @@ <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + + <li > <a href="../os_sched_resort/">os_sched_resort</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched_next_task/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched_next_task/index.html b/develop/os/core_os/context_switch/os_sched_next_task/index.html index 3c507dd..af16f1a 100644 --- a/develop/os/core_os/context_switch/os_sched_next_task/index.html +++ b/develop/os/core_os/context_switch/os_sched_next_task/index.html @@ -344,6 +344,14 @@ <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + + <li > <a href="../os_sched_resort/">os_sched_resort</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched_os_timer_exp/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched_os_timer_exp/index.html b/develop/os/core_os/context_switch/os_sched_os_timer_exp/index.html index 4b9541b..340d430 100644 --- a/develop/os/core_os/context_switch/os_sched_os_timer_exp/index.html +++ b/develop/os/core_os/context_switch/os_sched_os_timer_exp/index.html @@ -344,6 +344,14 @@ <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + + <li > <a href="../os_sched_resort/">os_sched_resort</a> </li> @@ -822,8 +830,8 @@ </li> <li class="pull-right"> - <a href=../os_sched_resort/> - Next: os_sched_resort + <a href=../os_sched_remove/> + Next: os_sched_remove <span class="fa fa-arrow-right"></span> </a> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched_remove/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched_remove/index.html b/develop/os/core_os/context_switch/os_sched_remove/index.html new file mode 100644 index 0000000..830f865 --- /dev/null +++ b/develop/os/core_os/context_switch/os_sched_remove/index.html @@ -0,0 +1,895 @@ +<!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"> + + + <!-- This is broken by doc revisioning. + <link rel="canonical" href="http://mynewt.apache.org/os/core_os/context_switch/os_sched_remove/"> --> + <link rel="shortcut icon" href="../../../../img/favicon.ico"> + + <title>os_sched_remove - Apache Mynewt</title> + + <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet"> + <link rel="stylesheet" href="../../../../css/highlight.css"> + <link href="../../../../css/base.css" rel="stylesheet"> + <link href="../../../../css/custom.css" rel="stylesheet"> + <link href="../../../../css/v2.css" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> + <link href="../../../../extra.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> + <![endif]--> + + + <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="os_sched_remove"> + + + <div class="container"> + <div class="row v2-main-banner"> + <a class="logo-cell" href="/"> + <img class="logo" src="/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.0.0</a> released (March 22, 2017) + </div> + </div> + </div> +</div> + + + + + + + + +<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" 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 + class="" +> + <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 + class="" +> + <a href="/about/">About</a> + </li> + <li + class="" +> + <a href="/talks/">Talks</a> + </li> + <li + class="active" +> + <a href="/latest/os/introduction">Documentation</a> + </li> + <li + class="" +> + <a href="/download/">Download</a> + </li> + <li + class="" +> + <a href="/community/">Community</a> + </li> + <li + class="" +> + <a href="/events/">Events</a> + </li> + </ul> + + <!-- Search, Navigation and Repo links --> + <ul class="nav navbar-nav navbar-right"> + + </ul> + </div> + </div> +</nav> + + + + <div class="container"> + + <div class="row"> + <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary"> + <div class="top"> + <div role="search"> + <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search documentation" /> + </div> + </form> + </div> + </div> + <ul class="toc-nav"> + <li class="doc-version"> +<select class="form-control" onchange="if (this.value) window.location.href=this.value"> + + <option + value="/develop/os/introduction" + selected="selected" + > + Version: develop (latest) + </option> + + <option + value="/v0_9_0/os/introduction" + + > + Version: 0.9.0 + </option> + +</select> +</li> + + + + + + + + + + + + + + + + + + + + + + <li ><a href="../../../introduction/">Mynewt Documentation</a> + + + <ul> + + + + + + + + <li ><a href="../../../get_started/get_started/">Basic Setup</a> + + + </li> + + + + + + <li > + <a href="../../../get_started/vocabulary/">Concepts</a> + </li> + + + + + + + + <li ><a href="../../../tutorials/tutorials/">Tutorials</a> + + + </li> + + + + + + + + <li ><a href="../../../os_user_guide/">OS User Guide</a> + + + <ul> + + + + + + + + <li ><a href="../../mynewt_os/">OS Core</a> + + + <ul> + + + + + + + + <li><a href=" + ../../os_started/ +">Functions</a> + + + </li> + + + + + + + + <li ><a href="../context_switch/">Scheduler</a> + + + <ul> + + + + + + + + <li><a href=" + ../os_sched/ +">Functions</a> + + + <ul> + + + + <li > + <a href="../os_sched/">os_sched</a> + </li> + + + + + + <li > + <a href="../os_arch_ctx_sw/">os_arch_ctx_sw</a> + </li> + + + + + + <li > + <a href="../os_sched_ctx_sw_hook/">os_sched_ctx_sw_hook</a> + </li> + + + + + + <li > + <a href="../os_sched_get_current_task/">os_sched_get_current_task</a> + </li> + + + + + + <li > + <a href="../os_sched_insert/">os_sched_insert</a> + </li> + + + + + + <li > + <a href="../os_sched_next_task/">os_sched_next_task</a> + </li> + + + + + + <li > + <a href="../os_sched_os_timer_exp/">os_sched_os_timer_exp</a> + </li> + + + + + + <li class="active"> + <a href="./">os_sched_remove</a> + </li> + + + + + + <li > + <a href="../os_sched_resort/">os_sched_resort</a> + </li> + + + + + + <li > + <a href="../os_sched_set_current_task/">os_sched_set_current_task</a> + </li> + + + + + + <li > + <a href="../os_sched_sleep/">os_sched_sleep</a> + </li> + + + + + + <li > + <a href="../os_sched_wakeup/">os_sched_wakeup</a> + </li> + + + + </ul> + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../time/os_time/">Time</a> + + + </li> + + + + + + + + <li ><a href="../../task/task/">Tasks</a> + + + </li> + + + + + + + + <li ><a href="../../event_queue/event_queue/">Event Queues</a> + + + </li> + + + + + + + + <li ><a href="../../semaphore/semaphore/">Semaphores</a> + + + </li> + + + + + + + + <li ><a href="../../mutex/mutex/">Mutexes</a> + + + </li> + + + + + + + + <li ><a href="../../memory_pool/memory_pool/">Memory Pools</a> + + + </li> + + + + + + + + <li ><a href="../../heap/heap/">Heap</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../mbuf/mbuf/ + +">Memory Buffers</a> + + + </li> + + + + + + + + <li ><a href="../../sanity/sanity/">Sanity</a> + + + </li> + + + + + + + + <li ><a href="../../callout/callout/">Callouts</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../porting/port_os/">Porting to your Platform</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/console/console/">Console</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/shell/shell/">Shell</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/split/split/">Split Images</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/bootloader/bootloader/">Bootloader</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../../modules/fs/fs/fs/ + +">File System</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/hal/hal/">Hardware Abstraction Layer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/drivers/driver/">Drivers</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/testutil/testutil/">Test Utilities</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/devmgmt/newtmgr/">Device Management with Newt Manager</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/imgmgr/imgmgr/">Image Manager</a> + + + </li> + + + + + + <li > + <a href="../../../modules/baselibc/">Baselibc library</a> + </li> + + + + + + + + <li ><a href="../../../modules/json/json/">JSON</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/fcb/fcb/">Flash Circular Buffer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/stats/stats/">Stats</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/logs/logs/">Logs</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/sysinitconfig/sysinitconfig/">System Configuration And Initialization</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../network/ble/ble_intro/ +">BLE User Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../faq/how_to_edit_docs/ +">Appendix</a> + + + </li> + + + + </ul> +</div></div> + + <div class="col-md-9" role="main"> + <div class="doc-header"> + <div role="navigation" aria-label="breadcrumbs navigation"> + <ul class="wy-breadcrumbs pull-right"> + <li><a href="/develop/os/introduction">Docs</a></li> + + + + <li>» <a href="../context_switch/">Scheduler</a></li> + + + + <li>» <a href="../os_sched/">Functions</a></li> + + + + <li>» os_sched_remove</li> + + + + </ul> +</div> + </div> + + <h2 id="os_sched_remove"><font color="#F2853F" style="font-size:24pt"> os_sched_remove </font></h2> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">int</span> <span style="color: #000000">os_sched_remove</span>(<span style="color: #A90D91">struct</span> <span style="color: #000000">os_task</span> <span style="color: #000000">*t</span>) +</pre></div> + + +<p>Stops and removes task <code>t</code>.</p> +<p>The function removes the task from the <code>g_os_task_list</code> task list. It also removes the task from one of the following task list:</p> +<ul> +<li><code>g_os_run_list</code> if the task is in the Ready state.</li> +<li><code>g_os_sleep_list</code> if the task is in the Sleep state.</li> +</ul> +<h4 id="arguments">Arguments</h4> +<table> +<thead> +<tr> +<th>Arguments</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td><code>t</code></td> +<td>Pointer to the <code>os_task</code> structure for the task to be removed.</td> +</tr> +</tbody> +</table> +<h4 id="returned-values">Returned values</h4> +<p>OS_OK - The task is removed successfully.</p> +<h4 id="notes">Notes</h4> +<p>This function must be called with all interrupts disabled.</p> +<h4 id="example">Example</h4> +<p>The <code>os_task_remove</code> function calls the <code>os_sched_remove</code> function to remove a task:</p> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">int</span> +<span style="color: #000000">os_task_remove</span>(<span style="color: #A90D91">struct</span> <span style="color: #000000">os_task</span> <span style="color: #000000">*t</span>) +{ + <span style="color: #A90D91">int</span> <span style="color: #000000">rc</span>; + <span style="color: #A90D91">os_sr_t</span> <span style="color: #000000">sr</span>; + + <span style="color: #177500">/* Add error checking code to ensure task can removed. */</span> + + + <span style="color: #177500">/* Call os_sched_remove to remove the task. */</span> + <span style="color: #000000">OS_ENTER_CRITICAL</span>(<span style="color: #000000">sr</span>); + <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">os_sched_remove</span>(<span style="color: #000000">t</span>); + <span style="color: #000000">OS_EXIT_CRITICAL</span>(<span style="color: #000000">sr</span>); + <span style="color: #A90D91">return</span> <span style="color: #000000">rc</span>; +} +</pre></div> + + <div class="row"> + + + + +<ul class="nav nav-pills" style="margin-bottom: 10px"> + <li> + + <a href=../os_sched_os_timer_exp/> + <span class="fa fa-arrow-left"></span> + Previous: os_sched_os_timer_exp + </a> + + </li> + <li class="pull-right"> + + <a href=../os_sched_resort/> + Next: os_sched_resort + <span class="fa fa-arrow-right"></span> + </a> + + </li> +</ul> + </div> + <footer class="row"> + <div class="col-xs-12"> + + <p class="copyright">Apache Mynewt (incubating) is available under Apache License, version 2.0.</p> + + </div> + <div class="col-xs-12"> + <div class="logos"> + <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> + <small class="footnote"> + MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + </small> + <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator"> + </div> + </div> +</footer> + </div> + </div> + + + </div> + + <script src="../../../../js/jquery-1.10.2.min.js"></script> + <script src="../../../../js/bootstrap-3.0.3.min.js"></script> + <script src="../../../../js/highlight.pack.js"></script> + <script src="../../../../js/base.js"></script> + <script src="../../../../js/custom.js"></script> + + </body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched_resort/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched_resort/index.html b/develop/os/core_os/context_switch/os_sched_resort/index.html index 3c7286b..d9edadf 100644 --- a/develop/os/core_os/context_switch/os_sched_resort/index.html +++ b/develop/os/core_os/context_switch/os_sched_resort/index.html @@ -343,6 +343,14 @@ + <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + <li class="active"> <a href="./">os_sched_resort</a> </li> @@ -830,9 +838,9 @@ <ul class="nav nav-pills" style="margin-bottom: 10px"> <li> - <a href=../os_sched_os_timer_exp/> + <a href=../os_sched_remove/> <span class="fa fa-arrow-left"></span> - Previous: os_sched_os_timer_exp + Previous: os_sched_remove </a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched_set_current_task/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched_set_current_task/index.html b/develop/os/core_os/context_switch/os_sched_set_current_task/index.html index 7e42cb2..818dbc2 100644 --- a/develop/os/core_os/context_switch/os_sched_set_current_task/index.html +++ b/develop/os/core_os/context_switch/os_sched_set_current_task/index.html @@ -344,6 +344,14 @@ <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + + <li > <a href="../os_sched_resort/">os_sched_resort</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched_sleep/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched_sleep/index.html b/develop/os/core_os/context_switch/os_sched_sleep/index.html index b99b6ba..ce39273 100644 --- a/develop/os/core_os/context_switch/os_sched_sleep/index.html +++ b/develop/os/core_os/context_switch/os_sched_sleep/index.html @@ -344,6 +344,14 @@ <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + + <li > <a href="../os_sched_resort/">os_sched_resort</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/context_switch/os_sched_wakeup/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/context_switch/os_sched_wakeup/index.html b/develop/os/core_os/context_switch/os_sched_wakeup/index.html index 315452a..3238b43 100644 --- a/develop/os/core_os/context_switch/os_sched_wakeup/index.html +++ b/develop/os/core_os/context_switch/os_sched_wakeup/index.html @@ -344,6 +344,14 @@ <li > + <a href="../os_sched_remove/">os_sched_remove</a> + </li> + + + + + + <li > <a href="../os_sched_resort/">os_sched_resort</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/event_queue/event_queue/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/event_queue/event_queue/index.html b/develop/os/core_os/event_queue/event_queue/index.html index c174396..a090d3d 100644 --- a/develop/os/core_os/event_queue/event_queue/index.html +++ b/develop/os/core_os/event_queue/event_queue/index.html @@ -839,9 +839,9 @@ The <code>os_eventq</code> structure defines an event queue and has the followin <ul class="nav nav-pills" style="margin-bottom: 10px"> <li> - <a href=../../task/os_task_init/> + <a href=../../task/os_task_remove/> <span class="fa fa-arrow-left"></span> - Previous: os_task_init + Previous: os_task_remove </a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/memory_pool/OS_MEMPOOL_BYTES/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/memory_pool/OS_MEMPOOL_BYTES/index.html b/develop/os/core_os/memory_pool/OS_MEMPOOL_BYTES/index.html index fafc106..e5a2bc7 100644 --- a/develop/os/core_os/memory_pool/OS_MEMPOOL_BYTES/index.html +++ b/develop/os/core_os/memory_pool/OS_MEMPOOL_BYTES/index.html @@ -362,6 +362,14 @@ <li > + <a href="../os_mempool_info_get_next/">os_mempool_info_get_next</a> + </li> + + + + + + <li > <a href="../os_mempool_init/">os_mempool_init</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/memory_pool/OS_MEMPOOL_SIZE/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/memory_pool/OS_MEMPOOL_SIZE/index.html b/develop/os/core_os/memory_pool/OS_MEMPOOL_SIZE/index.html index 37edec0..501842e 100644 --- a/develop/os/core_os/memory_pool/OS_MEMPOOL_SIZE/index.html +++ b/develop/os/core_os/memory_pool/OS_MEMPOOL_SIZE/index.html @@ -362,6 +362,14 @@ <li > + <a href="../os_mempool_info_get_next/">os_mempool_info_get_next</a> + </li> + + + + + + <li > <a href="../os_mempool_init/">os_mempool_init</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/memory_pool/memory_pool/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/memory_pool/memory_pool/index.html b/develop/os/core_os/memory_pool/memory_pool/index.html index b76d8eb..17daad3 100644 --- a/develop/os/core_os/memory_pool/memory_pool/index.html +++ b/develop/os/core_os/memory_pool/memory_pool/index.html @@ -723,11 +723,20 @@ Once the memory pool has been initialized the developer can allocate memory bloc <span style="color: #A90D91">int</span> <span style="color: #000000">mp_block_size</span>; <span style="color: #A90D91">int</span> <span style="color: #000000">mp_num_blocks</span>; <span style="color: #A90D91">int</span> <span style="color: #000000">mp_num_free</span>; + <span style="color: #A90D91">int</span> <span style="color: #000000">mp_min_free</span>; <span style="color: #A90D91">uint32_t</span> <span style="color: #000000">mp_membuf_addr</span>; <span style="color: #000000">STAILQ_ENTRY</span>(<span style="color: #000000">os_mempool</span>) <span style="color: #000000">mp_list</span>; <span style="color: #000000">SLIST_HEAD</span>(,<span style="color: #000000">os_memblock</span>); <span style="color: #A90D91">char</span> <span style="color: #000000">*name</span>; }; + +<span style="color: #A90D91">struct</span> <span style="color: #000000">os_mempool_info</span> { + <span style="color: #A90D91">int</span> <span style="color: #000000">omi_block_size</span>; + <span style="color: #A90D91">int</span> <span style="color: #000000">omi_num_blocks</span>; + <span style="color: #A90D91">int</span> <span style="color: #000000">omi_num_free</span>; + <span style="color: #A90D91">int</span> <span style="color: #000000">omi_min_free</span>; + <span style="color: #A90D91">char</span> <span style="color: #000000">omi_name</span>[<span style="color: #000000">OS_MEMPOOL_INFO_NAME_LEN</span>]; +}; </pre></div> @@ -753,6 +762,10 @@ Once the memory pool has been initialized the developer can allocate memory bloc <td>Number of free blocks left</td> </tr> <tr> +<td>mp_min_free</td> +<td>Lowest number of free blocks seen</td> +</tr> +<tr> <td>mp_membuf_addr</td> <td>The address of the memory block. This is used to check that a valid memory block is being freed.</td> </tr> @@ -793,6 +806,10 @@ Once the memory pool has been initialized the developer can allocate memory bloc <td>Releases previously allocated element back to the pool.</td> </tr> <tr> +<td><a href="../os_mempool_info_get_next">os_mempool_info_get_next</a></td> +<td>Retrieves memory pool information for the next memory pool.</td> +</tr> +<tr> <td><a href="../OS_MEMPOOL_BYTES">OS_MEMPOOL_BYTES</a></td> <td>Calculates how many bytes of memory is used by n number of elements, when individual element size is blksize bytes.</td> </tr> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/memory_pool/os_memblock_get/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/memory_pool/os_memblock_get/index.html b/develop/os/core_os/memory_pool/os_memblock_get/index.html index c775e00..bf3106b 100644 --- a/develop/os/core_os/memory_pool/os_memblock_get/index.html +++ b/develop/os/core_os/memory_pool/os_memblock_get/index.html @@ -362,6 +362,14 @@ <li > + <a href="../os_mempool_info_get_next/">os_mempool_info_get_next</a> + </li> + + + + + + <li > <a href="../os_mempool_init/">os_mempool_init</a> </li> @@ -785,8 +793,8 @@ </li> <li class="pull-right"> - <a href=../os_mempool_init/> - Next: os_mempool_init + <a href=../os_mempool_info_get_next/> + Next: os_mempool_info_get_next <span class="fa fa-arrow-right"></span> </a> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/memory_pool/os_memblock_put/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/memory_pool/os_memblock_put/index.html b/develop/os/core_os/memory_pool/os_memblock_put/index.html index d1a5af7..bcc6239 100644 --- a/develop/os/core_os/memory_pool/os_memblock_put/index.html +++ b/develop/os/core_os/memory_pool/os_memblock_put/index.html @@ -362,6 +362,14 @@ <li > + <a href="../os_mempool_info_get_next/">os_mempool_info_get_next</a> + </li> + + + + + + <li > <a href="../os_mempool_init/">os_mempool_init</a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/memory_pool/os_mempool_info_get_next/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/memory_pool/os_mempool_info_get_next/index.html b/develop/os/core_os/memory_pool/os_mempool_info_get_next/index.html new file mode 100644 index 0000000..69aab0b --- /dev/null +++ b/develop/os/core_os/memory_pool/os_mempool_info_get_next/index.html @@ -0,0 +1,879 @@ +<!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"> + + + <!-- This is broken by doc revisioning. + <link rel="canonical" href="http://mynewt.apache.org/os/core_os/memory_pool/os_mempool_info_get_next/"> --> + <link rel="shortcut icon" href="../../../../img/favicon.ico"> + + <title>os_mempool_info_get_next - Apache Mynewt</title> + + <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet"> + <link rel="stylesheet" href="../../../../css/highlight.css"> + <link href="../../../../css/base.css" rel="stylesheet"> + <link href="../../../../css/custom.css" rel="stylesheet"> + <link href="../../../../css/v2.css" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> + <link href="../../../../extra.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> + <![endif]--> + + + <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="os_mempool_info_get_next"> + + + <div class="container"> + <div class="row v2-main-banner"> + <a class="logo-cell" href="/"> + <img class="logo" src="/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.0.0</a> released (March 22, 2017) + </div> + </div> + </div> +</div> + + + + + + + + +<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" 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 + class="" +> + <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 + class="" +> + <a href="/about/">About</a> + </li> + <li + class="" +> + <a href="/talks/">Talks</a> + </li> + <li + class="active" +> + <a href="/latest/os/introduction">Documentation</a> + </li> + <li + class="" +> + <a href="/download/">Download</a> + </li> + <li + class="" +> + <a href="/community/">Community</a> + </li> + <li + class="" +> + <a href="/events/">Events</a> + </li> + </ul> + + <!-- Search, Navigation and Repo links --> + <ul class="nav navbar-nav navbar-right"> + + </ul> + </div> + </div> +</nav> + + + + <div class="container"> + + <div class="row"> + <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary"> + <div class="top"> + <div role="search"> + <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search documentation" /> + </div> + </form> + </div> + </div> + <ul class="toc-nav"> + <li class="doc-version"> +<select class="form-control" onchange="if (this.value) window.location.href=this.value"> + + <option + value="/develop/os/introduction" + selected="selected" + > + Version: develop (latest) + </option> + + <option + value="/v0_9_0/os/introduction" + + > + Version: 0.9.0 + </option> + +</select> +</li> + + + + + + + + + + + + + + + + + + + + + + <li ><a href="../../../introduction/">Mynewt Documentation</a> + + + <ul> + + + + + + + + <li ><a href="../../../get_started/get_started/">Basic Setup</a> + + + </li> + + + + + + <li > + <a href="../../../get_started/vocabulary/">Concepts</a> + </li> + + + + + + + + <li ><a href="../../../tutorials/tutorials/">Tutorials</a> + + + </li> + + + + + + + + <li ><a href="../../../os_user_guide/">OS User Guide</a> + + + <ul> + + + + + + + + <li ><a href="../../mynewt_os/">OS Core</a> + + + <ul> + + + + + + + + <li><a href=" + ../../os_started/ +">Functions</a> + + + </li> + + + + + + + + <li ><a href="../../context_switch/context_switch/">Scheduler</a> + + + </li> + + + + + + + + <li ><a href="../../time/os_time/">Time</a> + + + </li> + + + + + + + + <li ><a href="../../task/task/">Tasks</a> + + + </li> + + + + + + + + <li ><a href="../../event_queue/event_queue/">Event Queues</a> + + + </li> + + + + + + + + <li ><a href="../../semaphore/semaphore/">Semaphores</a> + + + </li> + + + + + + + + <li ><a href="../../mutex/mutex/">Mutexes</a> + + + </li> + + + + + + + + <li ><a href="../memory_pool/">Memory Pools</a> + + + <ul> + + + + + + + + <li><a href=" + ../os_memblock_get/ +">Functions/Macros</a> + + + <ul> + + + + <li > + <a href="../os_memblock_get/">os_memblock_get</a> + </li> + + + + + + <li class="active"> + <a href="./">os_mempool_info_get_next</a> + </li> + + + + + + <li > + <a href="../os_mempool_init/">os_mempool_init</a> + </li> + + + + + + <li > + <a href="../os_memblock_put/">os_memblock_put</a> + </li> + + + + + + <li > + <a href="../OS_MEMPOOL_BYTES/">OS_MEMPOOL_BYTES</a> + </li> + + + + + + <li > + <a href="../OS_MEMPOOL_SIZE/">OS_MEMPOOL_SIZE</a> + </li> + + + + </ul> + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../heap/heap/">Heap</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../mbuf/mbuf/ + +">Memory Buffers</a> + + + </li> + + + + + + + + <li ><a href="../../sanity/sanity/">Sanity</a> + + + </li> + + + + + + + + <li ><a href="../../callout/callout/">Callouts</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../porting/port_os/">Porting to your Platform</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/console/console/">Console</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/shell/shell/">Shell</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/split/split/">Split Images</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/bootloader/bootloader/">Bootloader</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../../modules/fs/fs/fs/ + +">File System</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/hal/hal/">Hardware Abstraction Layer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/drivers/driver/">Drivers</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/testutil/testutil/">Test Utilities</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/devmgmt/newtmgr/">Device Management with Newt Manager</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/imgmgr/imgmgr/">Image Manager</a> + + + </li> + + + + + + <li > + <a href="../../../modules/baselibc/">Baselibc library</a> + </li> + + + + + + + + <li ><a href="../../../modules/json/json/">JSON</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/fcb/fcb/">Flash Circular Buffer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/stats/stats/">Stats</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/logs/logs/">Logs</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/sysinitconfig/sysinitconfig/">System Configuration And Initialization</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../network/ble/ble_intro/ +">BLE User Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../faq/how_to_edit_docs/ +">Appendix</a> + + + </li> + + + + </ul> +</div></div> + + <div class="col-md-9" role="main"> + <div class="doc-header"> + <div role="navigation" aria-label="breadcrumbs navigation"> + <ul class="wy-breadcrumbs pull-right"> + <li><a href="/develop/os/introduction">Docs</a></li> + + + + <li>» <a href="../memory_pool/">Memory Pools</a></li> + + + + <li>» <a href="../os_memblock_get/">Functions/Macros</a></li> + + + + <li>» os_mempool_info_get_next</li> + + + + </ul> +</div> + </div> + + <h2 id="os_mempool_info_get_next"><font color="F2853F" style="font-size:24pt"> os_mempool_info_get_next</font></h2> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">struct</span> <span style="color: #000000">os_mempool</span> <span style="color: #000000">*</span> <span style="color: #000000">os_mempool_info_get_next</span>(<span style="color: #A90D91">struct</span> <span style="color: #000000">os_mempool</span> <span style="color: #000000">*mp</span>, <span style="color: #A90D91">struct</span> <span style="color: #000000">os_mempool_info</span> <span style="color: #000000">*omi</span>) +</pre></div> + + +<p>Populates the os_mempool_info structure pointed to by <code>omi</code> with memory pool information. +The value of <code>mp</code> specifies the memory pool information to populate. If <code>mp</code> is <strong>NULL</strong>, it populates the information for the first memory pool on the memory pool list. If <code>mp</code> is not NULL, it populates the information for the next memory pool after <code>mp</code>. </p> +<p><br></p> +<h4 id="arguments">Arguments</h4> +<table> +<thead> +<tr> +<th>Arguments</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td><code>mp</code></td> +<td>Pointer to the memory pool in the memory pool list from the previous <code>os_mempool_info_get_next</code> function call. The next memory pool after <code>mp</code> is populated. If <code>mp</code> is NULL, the first memory pool on the memory pool list is populated.</td> +</tr> +<tr> +<td><code>omi</code></td> +<td>Pointer to <code>os_mempool_info</code> structure where memory information will be stored.</td> +</tr> +</tbody> +</table> +<p><br></p> +<h4 id="returned-values">Returned values</h4> +<ul> +<li> +<p>A pointer to the memory pool structure that was used to populate the memory pool information structure. </p> +</li> +<li> +<p>NULL indicates <code>mp</code> is the last memory pool on the list and <code>omi</code> is not populated with memory pool information.</p> +</li> +</ul> +<p><br></p> +<h4 id="example">Example</h4> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">shell_os_mpool_display_cmd</span>(<span style="color: #A90D91">int</span> <span style="color: #000000">argc</span>, <span style="color: #A90D91">char</span> <span style="color: #000000">**argv</span>) +{ + <span style="color: #A90D91">struct</span> <span style="color: #000000">os_mempool</span> <span style="color: #000000">*mp</span>; + <span style="color: #A90D91">struct</span> <span style="color: #000000">os_mempool_info</span> <span style="color: #000000">omi</span>; + <span style="color: #A90D91">char</span> <span style="color: #000000">*name</span>; + + <span style="color: #000000">name</span> <span style="color: #000000">=</span> <span style="color: #A90D91">NULL</span>; + <span style="color: #000000">found</span> <span style="color: #000000">=</span> <span style="color: #1C01CE">0</span>; + + <span style="color: #A90D91">if</span> (<span style="color: #000000">argc</span> <span style="color: #000000">></span> <span style="color: #1C01CE">1</span> <span style="color: #000000">&&</span> <span style="color: #000000">strcmp</span>(<span style="color: #000000">argv</span>[<span style="color: #1C01CE">1</span>], <span style="color: #C41A16">""</span>)) { + <span style="color: #000000">name</span> <span style="color: #000000">=</span> <span style="color: #000000">argv</span>[<span style="color: #1C01CE">1</span>]; + } + <span style="color: #000000">console_printf</span>(<span style="color: #C41A16">"Mempools: \n"</span>); + <span style="color: #000000">mp</span> <span style="color: #000000">=</span> <span style="color: #A90D91">NULL</span>; + <span style="color: #000000">console_printf</span>(<span style="color: #C41A16">"%32s %5s %4s %4s %4s\n"</span>, <span style="color: #C41A16">"name"</span>, <span style="color: #C41A16">"blksz"</span>, <span style="color: #C41A16">"cnt"</span>, <span style="color: #C41A16">"free"</span>, + <span style="color: #C41A16">"min"</span>); + <span style="color: #A90D91">while</span> (<span style="color: #1C01CE">1</span>) { + <span style="color: #000000">mp</span> <span style="color: #000000">=</span> <span style="color: #000000">o</span>{<span style="color: #000000">_mempool_info_get_next</span>(<span style="color: #000000">mp</span>, <span style="color: #000000">&omi</span>); + <span style="color: #A90D91">if</span> (<span style="color: #000000">mp</span> <span style="color: #000000">==</span> <span style="color: #A90D91">NULL</span>) { + <span style="color: #A90D91">break</span>; + } + <span style="color: #A90D91">if</span> (<span style="color: #000000">name</span>) { + <span style="color: #A90D91">if</span> (<span style="color: #000000">strcmp</span>(<span style="color: #000000">name</span>, <span style="color: #000000">omi</span>.<span style="color: #000000">omi_name</span>)) { + <span style="color: #A90D91">continue</span>; + } <span style="color: #A90D91">else</span> { + <span style="color: #000000">found</span> <span style="color: #000000">=</span> <span style="color: #1C01CE">1</span>; + } + } + + <span style="color: #000000">console_printf</span>(<span style="color: #C41A16">"%32s %5d %4d %4d %4d\n"</span>, <span style="color: #000000">omi</span>.<span style="color: #000000">omi_name</span>, + <span style="color: #000000">omi</span>.<span style="color: #000000">omi_block_size</span>, <span style="color: #000000">omi</span>.<span style="color: #000000">omi_num_blocks</span>, + <span style="color: #000000">omi</span>.<span style="color: #000000">omi_num_free</span>, <span style="color: #000000">omi</span>.<span style="color: #000000">omi_min_free</span>); + } + + <span style="color: #A90D91">if</span> (<span style="color: #000000">name</span> <span style="color: #000000">&&</span> <span style="color: #000000">!found</span>) { + <span style="color: #000000">console_printf</span>(<span style="color: #C41A16">"Couldn't find a memory pool with name %s\n"</span>, + <span style="color: #000000">name</span>); + } + <span style="color: #A90D91">return</span> (<span style="color: #1C01CE">0</span>); +} +</pre></div> + + <div class="row"> + + + + +<ul class="nav nav-pills" style="margin-bottom: 10px"> + <li> + + <a href=../os_memblock_get/> + <span class="fa fa-arrow-left"></span> + Previous: os_memblock_get + </a> + + </li> + <li class="pull-right"> + + <a href=../os_mempool_init/> + Next: os_mempool_init + <span class="fa fa-arrow-right"></span> + </a> + + </li> +</ul> + </div> + <footer class="row"> + <div class="col-xs-12"> + + <p class="copyright">Apache Mynewt (incubating) is available under Apache License, version 2.0.</p> + + </div> + <div class="col-xs-12"> + <div class="logos"> + <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> + <small class="footnote"> + MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + </small> + <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator"> + </div> + </div> +</footer> + </div> + </div> + + + </div> + + <script src="../../../../js/jquery-1.10.2.min.js"></script> + <script src="../../../../js/bootstrap-3.0.3.min.js"></script> + <script src="../../../../js/highlight.pack.js"></script> + <script src="../../../../js/base.js"></script> + <script src="../../../../js/custom.js"></script> + + </body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/memory_pool/os_mempool_init/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/memory_pool/os_mempool_init/index.html b/develop/os/core_os/memory_pool/os_mempool_init/index.html index bfdb2ec..e039fb3 100644 --- a/develop/os/core_os/memory_pool/os_mempool_init/index.html +++ b/develop/os/core_os/memory_pool/os_mempool_init/index.html @@ -361,6 +361,14 @@ + <li > + <a href="../os_mempool_info_get_next/">os_mempool_info_get_next</a> + </li> + + + + + <li class="active"> <a href="./">os_mempool_init</a> </li> @@ -802,9 +810,9 @@ <ul class="nav nav-pills" style="margin-bottom: 10px"> <li> - <a href=../os_memblock_get/> + <a href=../os_mempool_info_get_next/> <span class="fa fa-arrow-left"></span> - Previous: os_memblock_get + Previous: os_mempool_info_get_next </a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/task/os_task_count/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/task/os_task_count/index.html b/develop/os/core_os/task/os_task_count/index.html index b65d6e1..50d1061 100644 --- a/develop/os/core_os/task/os_task_count/index.html +++ b/develop/os/core_os/task/os_task_count/index.html @@ -331,6 +331,14 @@ + + + <li > + <a href="../os_task_remove/">os_task_remove</a> + </li> + + + </ul> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/task/os_task_info_get_next/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/task/os_task_info_get_next/index.html b/develop/os/core_os/task/os_task_info_get_next/index.html index d1e9712..e411a47 100644 --- a/develop/os/core_os/task/os_task_info_get_next/index.html +++ b/develop/os/core_os/task/os_task_info_get_next/index.html @@ -331,6 +331,14 @@ + + + <li > + <a href="../os_task_remove/">os_task_remove</a> + </li> + + + </ul> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/task/os_task_init/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/task/os_task_init/index.html b/develop/os/core_os/task/os_task_init/index.html index 26036da..89bda77 100644 --- a/develop/os/core_os/task/os_task_init/index.html +++ b/develop/os/core_os/task/os_task_init/index.html @@ -331,6 +331,14 @@ + + + <li > + <a href="../os_task_remove/">os_task_remove</a> + </li> + + + </ul> </li> @@ -803,8 +811,8 @@ tasks.</p> </li> <li class="pull-right"> - <a href=../../event_queue/event_queue/> - Next: Event Queues + <a href=../os_task_remove/> + Next: os_task_remove <span class="fa fa-arrow-right"></span> </a> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/task/os_task_remove/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/task/os_task_remove/index.html b/develop/os/core_os/task/os_task_remove/index.html new file mode 100644 index 0000000..bdace0b --- /dev/null +++ b/develop/os/core_os/task/os_task_remove/index.html @@ -0,0 +1,831 @@ +<!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"> + + + <!-- This is broken by doc revisioning. + <link rel="canonical" href="http://mynewt.apache.org/os/core_os/task/os_task_remove/"> --> + <link rel="shortcut icon" href="../../../../img/favicon.ico"> + + <title>os_task_remove - Apache Mynewt</title> + + <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet"> + <link rel="stylesheet" href="../../../../css/highlight.css"> + <link href="../../../../css/base.css" rel="stylesheet"> + <link href="../../../../css/custom.css" rel="stylesheet"> + <link href="../../../../css/v2.css" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> + <link href="../../../../extra.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> + <![endif]--> + + + <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="os_task_remove"> + + + <div class="container"> + <div class="row v2-main-banner"> + <a class="logo-cell" href="/"> + <img class="logo" src="/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.0.0</a> released (March 22, 2017) + </div> + </div> + </div> +</div> + + + + + + + + +<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" 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 + class="" +> + <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 + class="" +> + <a href="/about/">About</a> + </li> + <li + class="" +> + <a href="/talks/">Talks</a> + </li> + <li + class="active" +> + <a href="/latest/os/introduction">Documentation</a> + </li> + <li + class="" +> + <a href="/download/">Download</a> + </li> + <li + class="" +> + <a href="/community/">Community</a> + </li> + <li + class="" +> + <a href="/events/">Events</a> + </li> + </ul> + + <!-- Search, Navigation and Repo links --> + <ul class="nav navbar-nav navbar-right"> + + </ul> + </div> + </div> +</nav> + + + + <div class="container"> + + <div class="row"> + <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary"> + <div class="top"> + <div role="search"> + <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search documentation" /> + </div> + </form> + </div> + </div> + <ul class="toc-nav"> + <li class="doc-version"> +<select class="form-control" onchange="if (this.value) window.location.href=this.value"> + + <option + value="/develop/os/introduction" + selected="selected" + > + Version: develop (latest) + </option> + + <option + value="/v0_9_0/os/introduction" + + > + Version: 0.9.0 + </option> + +</select> +</li> + + + + + + + + + + + + + + + + + + + + + + <li ><a href="../../../introduction/">Mynewt Documentation</a> + + + <ul> + + + + + + + + <li ><a href="../../../get_started/get_started/">Basic Setup</a> + + + </li> + + + + + + <li > + <a href="../../../get_started/vocabulary/">Concepts</a> + </li> + + + + + + + + <li ><a href="../../../tutorials/tutorials/">Tutorials</a> + + + </li> + + + + + + + + <li ><a href="../../../os_user_guide/">OS User Guide</a> + + + <ul> + + + + + + + + <li ><a href="../../mynewt_os/">OS Core</a> + + + <ul> + + + + + + + + <li><a href=" + ../../os_started/ +">Functions</a> + + + </li> + + + + + + + + <li ><a href="../../context_switch/context_switch/">Scheduler</a> + + + </li> + + + + + + + + <li ><a href="../../time/os_time/">Time</a> + + + </li> + + + + + + + + <li ><a href="../task/">Tasks</a> + + + <ul> + + + + + + + + <li><a href=" + ../os_task_count/ +">Functions</a> + + + <ul> + + + + <li > + <a href="../os_task_count/">os_task_count</a> + </li> + + + + + + <li > + <a href="../os_task_info_get_next/">os_task_info_get_next</a> + </li> + + + + + + <li > + <a href="../os_task_init/">os_task_init</a> + </li> + + + + + + <li class="active"> + <a href="./">os_task_remove</a> + </li> + + + + </ul> + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../event_queue/event_queue/">Event Queues</a> + + + </li> + + + + + + + + <li ><a href="../../semaphore/semaphore/">Semaphores</a> + + + </li> + + + + + + + + <li ><a href="../../mutex/mutex/">Mutexes</a> + + + </li> + + + + + + + + <li ><a href="../../memory_pool/memory_pool/">Memory Pools</a> + + + </li> + + + + + + + + <li ><a href="../../heap/heap/">Heap</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../mbuf/mbuf/ + +">Memory Buffers</a> + + + </li> + + + + + + + + <li ><a href="../../sanity/sanity/">Sanity</a> + + + </li> + + + + + + + + <li ><a href="../../callout/callout/">Callouts</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../porting/port_os/">Porting to your Platform</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/console/console/">Console</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/shell/shell/">Shell</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/split/split/">Split Images</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/bootloader/bootloader/">Bootloader</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../../modules/fs/fs/fs/ + +">File System</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/hal/hal/">Hardware Abstraction Layer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/drivers/driver/">Drivers</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/testutil/testutil/">Test Utilities</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/devmgmt/newtmgr/">Device Management with Newt Manager</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/imgmgr/imgmgr/">Image Manager</a> + + + </li> + + + + + + <li > + <a href="../../../modules/baselibc/">Baselibc library</a> + </li> + + + + + + + + <li ><a href="../../../modules/json/json/">JSON</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/fcb/fcb/">Flash Circular Buffer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/stats/stats/">Stats</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/logs/logs/">Logs</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/sysinitconfig/sysinitconfig/">System Configuration And Initialization</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../network/ble/ble_intro/ +">BLE User Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../faq/how_to_edit_docs/ +">Appendix</a> + + + </li> + + + + </ul> +</div></div> + + <div class="col-md-9" role="main"> + <div class="doc-header"> + <div role="navigation" aria-label="breadcrumbs navigation"> + <ul class="wy-breadcrumbs pull-right"> + <li><a href="/develop/os/introduction">Docs</a></li> + + + + <li>» <a href="../task/">Tasks</a></li> + + + + <li>» <a href="../os_task_count/">Functions</a></li> + + + + <li>» os_task_remove</li> + + + + </ul> +</div> + </div> + + <h2 id="os_task_remove"><font color="F2853F" style="font-size:24pt"> os_task_remove</font></h2> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">int</span> <span style="color: #000000">os_task_remove</span>(<span style="color: #A90D91">struct</span> <span style="color: #000000">os_task</span> <span style="color: #000000">*t</span>) +</pre></div> + + +<p>Removes a task, <code>t</code>, from the task list. A task cannot be removed when it is in one of the following states:</p> +<ul> +<li>It is running - a task cannot remove itself.</li> +<li>It has not been initialized.</li> +<li>It is holding a lock on a semphore or mutex.</li> +<li>It is suspended waiting on a lock (semaphore or mutex) or for an event on an event queue.</li> +</ul> +<p><br></p> +<h4 id="arguments">Arguments</h4> +<table> +<thead> +<tr> +<th>Arguments</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td><code>t</code></td> +<td>Pointer to the <code>os_task</code> structure for the task to be removed</td> +</tr> +</tbody> +</table> +<p><br></p> +<h4 id="returned-values">Returned values</h4> +<p><code>OS_OK</code>: Task <code>t</code> is removed sucessfully. +<br><code>OS_INVALID_PARM</code>: Task <code>t</code> is the calling task. A task cannot remove itself. +<br><code>OS_NOT_STARTED</code>: Task <code>t</code> is not initialized. +<br><code>OS_EBUSY</code>: Task <code>t</code> is either holding a lock or suspended waiting on lock on event. +<br></p> +<h4 id="example">Example</h4> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">struct</span> <span style="color: #000000">os_task</span> <span style="color: #000000">worker_task</span>; + +<span style="color: #A90D91">int</span> +<span style="color: #000000">remove_my_worker_task</span>(<span style="color: #A90D91">void</span>) +{ + <span style="color: #177500">/* Add error checking code to ensure task can removed. */</span> + + <span style="color: #177500">/* Call os_task_remove to remove the worker task */</span> + <span style="color: #000000">rc</span> <span style="color: #000000">=</span> <span style="color: #000000">os_task_remove</span>(<span style="color: #000000">&worker_task</span>); + <span style="color: #A90D91">return</span> <span style="color: #000000">rc</span>; +} +</pre></div> + + <div class="row"> + + + + +<ul class="nav nav-pills" style="margin-bottom: 10px"> + <li> + + <a href=../os_task_init/> + <span class="fa fa-arrow-left"></span> + Previous: os_task_init + </a> + + </li> + <li class="pull-right"> + + <a href=../../event_queue/event_queue/> + Next: Event Queues + <span class="fa fa-arrow-right"></span> + </a> + + </li> +</ul> + </div> + <footer class="row"> + <div class="col-xs-12"> + + <p class="copyright">Apache Mynewt (incubating) is available under Apache License, version 2.0.</p> + + </div> + <div class="col-xs-12"> + <div class="logos"> + <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> + <small class="footnote"> + MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + </small> + <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator"> + </div> + </div> +</footer> + </div> + </div> + + + </div> + + <script src="../../../../js/jquery-1.10.2.min.js"></script> + <script src="../../../../js/bootstrap-3.0.3.min.js"></script> + <script src="../../../../js/highlight.pack.js"></script> + <script src="../../../../js/base.js"></script> + <script src="../../../../js/custom.js"></script> + + </body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6b7450f6/develop/os/core_os/task/task/index.html ---------------------------------------------------------------------- diff --git a/develop/os/core_os/task/task/index.html b/develop/os/core_os/task/task/index.html index 59d0605..41b73b5 100644 --- a/develop/os/core_os/task/task/index.html +++ b/develop/os/core_os/task/task/index.html @@ -1016,6 +1016,10 @@ task simply toggles an LED at a one second interval.</p> <td><a href="../os_task_info_get_next/">os_task_info_get_next</a></td> <td>Populates the os task info structure given with task information.</td> </tr> +<tr> +<td><a href="../os_task_remove/">os_task_remove</a></td> +<td>Removes a task from the task list.</td> +</tr> </tbody> </table>
