~~NOTOC~~ \\ {{:b_tnkernel.png|TNKernel for PIC24/dsPIC}} ====== TNKernel ====== ===== Document Disclaimer ===== The information in this document is subject to change without notice. While the information herein is assumed to be accurate, Yuri Tiomkin (the author) assumes no responsibility for any errors or omissions. The author makes and you receive no warranties or conditions, express, implied, statutory or in any communications with you. The author specifically disclaims any implied warranty of merchantability or fitness for a particular purpose. ~~UP~~ ===== Copyright notice ===== TNKernel real time kernel Copyright © 2004,2006 Yuri Tiomkin All rights reserved. Permission to use, copy, modify, and distribute this software in source and binary forms and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. THIS SOFTWARE IS PROVIDED BY THE YURI TIOMKIN AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL YURI TIOMKIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ~~UP~~ ===== Trademarks ===== Names mentioned in this manual may be trademarks of their respective companies. Brand and product names are trademarks or registered trademarks of their respective holders. ~~UP~~ ===== Introduction ===== **TNKernel** is a compact and very fast real-time kernel for the embedded 32/16 bits microprocessors. TNKernel performs a preemptive priority-based scheduling and a round-robin scheduling for the tasks with identical priority. The current version of TNKernel includes semaphores, mutexes, data queues, event flags and fixed-sized memory pools. The system functions calls in the interrupts are supported. TNKernel is a fully portable (is written mostly in ANSI C except the processor-specific parts), but the current version of TNKernel has been ported for the ARM and PIC24/dsPIC microprocessors only. TNKernel has been written "under the significant influence" of the [[http://www.assoc.tron.org/eng/document.html | μITRON 4.0]] Specifications ((µITRON 4.0 Specifications is an open real­time kernel specification developed by the ITRON Committee of the TRON Association. The µITRON 4.0 Specification document can be obtained from the ITRON Project web site)). TNKernel support the following RTOS objects: * [[en:tnkernel:ref:task:intro|tasks]] * [[en:tnkernel:ref:sem:intro|semaphores]] * [[en:tnkernel:ref:mutex:intro|mutexes]] * [[en:tnkernel:ref:dqueue:intro|data queues]] * [[en:tnkernel:ref:event:intro|event flags]] * [[en:tnkernel:ref:mpool:intro|fixed-sized memory pools]] TNKernel is a fully portable (written mostly in ANSI C except processor-specific parts), so I port [[http://www.tnkernel.com | original version]] for 16-bits Microchip MCU and DSC. TNKernel is distributed in the source code form free of charge under the FreeBSD-like ~~UP~~ ===== Contents ===== * [[en:tnkernel:ref:task:intro|Tasks]] * [[en:tnkernel:ref:task:intro#Introduction|Introduction]] * [[en:tnkernel:ref:task:intro#Task States|Task States]] * [[en:tnkernel:ref:task:intro#Scheduling Rules|Scheduling Rules]] * [[en:tnkernel:ref:task:intro#System Tasks|System Tasks]] * [[en:tnkernel:ref:task:intro#Task Control Block|Task Control Block]] * [[en:tnkernel:ref:task:intro#Task API|Task API]] * [[en:tnkernel:ref:sem:intro|Semaphores]] * [[en:tnkernel:ref:sem:intro#Introduction|Introduction]] * [[en:tnkernel:ref:sem:intro#Semaphore Control Block|Semaphore Control Block]] * [[en:tnkernel:ref:sem:intro#Semaphore API|Semaphore API]] * [[en:tnkernel:ref:event:intro|Event Flags]] * [[en:tnkernel:ref:event:intro#Introduction|Introduction]] * [[en:tnkernel:ref:event:intro#Event Flag Control Block|Event Flag Control Block]] * [[en:tnkernel:ref:event:intro#Event Flag API|Event Flag API]] * [[en:tnkernel:ref:dqueue:intro|Data Queues]] * [[en:tnkernel:ref:dqueue:intro#Introduction|Introduction]] * [[en:tnkernel:ref:dqueue:intro#Data Queue Control Block|Data Queue Control Block]] * [[en:tnkernel:ref:dqueue:intro#Data Queue API|Data Queue API]] * [[en:tnkernel:ref:mutex:intro|Mutexes]] * [[en:tnkernel:ref:mutex:intro#Introduction|Introduction]] * [[en:tnkernel:ref:mutex:intro#Priority Inversion|Priority Inversion]] * [[en:tnkernel:ref:mutex:intro#Deadlocks|Deadlocks]] * [[en:tnkernel:ref:mutex:intro#Mutex Control Block|Mutex Control Block]] * [[en:tnkernel:ref:mutex:intro#Mutex API|Mutex API]] * [[en:tnkernel:ref:mpool:intro|Fixed-sized Memory Pools]] * [[en:tnkernel:ref:mpool:intro#Introduction|Introduction]] * [[en:tnkernel:ref:mpool:intro#Fixed-sized Memory Pool Control Block|Fixed-sized Memory Pool Control Block]] * [[en:tnkernel:ref:mpool:intro#Fixed-sized Memory Pool API|Fixed-sized Memory Pool API]] * [[en:tnkernel:ref:sys:intro|System Services]] * [[en:tnkernel:ref:sys:intro#Introduction|Introduction]] * [[en:tnkernel:ref:sys:intro#System Start|System Start]] * [[en:tnkernel:ref:sys:intro#System Timer|Системный таймер]] * [[en:tnkernel:ref:sys:intro#Round-Robin Scheduling|Round-Robin Scheduling]] * [[en:tnkernel:ref:sys:intro#Critical Sections|Critical Sections]] * [[en:tnkernel:ref:sys:intro#System Time|System Time]] * [[en:tnkernel:ref:sys:intro#System API|System API]] ~~UP~~