1 /* 2 * This file is only used for doxygen document generation. 3 */ 4 5 /** 6 * @defgroup Kernel RT-Thread Kernel API 7 * 8 * The Kernel APIs are the core APIs of RT-Thread, which supports the following 9 * features: 10 * - Multi-thread management 11 * - Synchronization mechanisms 12 * - Inter-thread communication 13 * - Memory management 14 * - Asynchronous timer 15 */ 16 17 /** 18 * @addtogroup Kernel 19 */ 20 /*@{*/ 21 22 /** 23 * @defgroup Thread Thread Management 24 * @brief the thread management 25 * 26 * RT-Thread operating system supports multitask systems, which are based on thread 27 * scheduling. 28 * - The scheduling is a full preemptive priority-based scheduling algorithm. 29 * - 8/32/256 priority levels are supported, in which 0 is the highest and 7/31/255 the lowest. 30 * The 7/31/255th priority is used for idle thread. 31 * - Threads running at same priority level are supported. The shared time-slice 32 * round-robin scheduling is used for this case. 33 * - The time of scheduler to choose the next highest ready thread is determinant. 34 * - There are four status in thread management 35 * -# Initialization 36 * -# Running/Ready 37 * -# Blocked 38 * -# Closed 39 * - The number of threads in the system is unlimited, only related with RAM. 40 */ 41 42 /** 43 * @defgroup Clock Clock and Timer Management 44 * * @brief clock and system timer management 45 * 46 * RT-Thread uses clock tick to implement shared time-slice scheduling. 47 * 48 * The timing sensitivity of thread is implemented by timers. The timer can be set as 49 * one-shot or periodic timeout. 50 */ 51 52 /** 53 * @defgroup KernelObject Kernel Object Management 54 * @brief kernel object management 55 * 56 * The Kernel object system can access and manage all of the kernel objects. 57 * 58 * Kernel objects include most of the facilities in the kernel: 59 * - thread 60 * - semaphore and mutex 61 * - event/fast event, mailbox, messagequeue 62 * - memory pool 63 * - timer 64 * @image html Kernel_Object.png "Figure 2: Kernel Object" 65 * @image rtf Kernel_Object.png "Figure 2: Kernel Object" 66 * 67 * Kernel objects can be static objects, whose memory is allocated in compiling. 68 * It can be dynamic objects as well, whose memory is allocated from system heaps 69 * in runtime. 70 */ 71 72 /** 73 * @defgroup IPC Inter-Thread Communication 74 * @brief inter-thread communication 75 * 76 * RT-Thread operating system supports the traditional semaphore and mutex. 77 * - Mutex objects use inherited priority to prevent priority reversion. 78 * - The semaphore release action is safe for interrupt service routine. 79 * 80 * Moreover, the blocked queue for thread to obtain semaphore or mutex can be sorted 81 * by priority or FIFO. There are two flags to indicate this mechanism. 82 * - RT_IPC_FLAG_FIFO 83 * when the resource is available, thread pended on this resource at first would get 84 * the resource. 85 * - RT_IPC_FLAG_PRIO 86 * when the resource is available, thread pended on this resource who had the most high 87 * priority would get the resource. 88 * 89 * RT-Thread operating systems supports event/fast event, mail box and message queue. 90 * - The event mechanism is used to awake a thead by setting one or more corresponding 91 * bit of a binary number when an event ocurs. 92 * - The fast event supports event thread queue. Once a one bit event occurs, the corresponding 93 * blocked thread can be found out timing accurately, then will be waked up. 94 * - In mailbox, the mail length is fixed to 4 byte, which is more effective than message queue. 95 * - The send action for communication facilities is also safe for interrupt service routine. 96 */ 97 98 /** 99 * @defgroup MM Memory Management 100 * @brief memory management for memory pool and heap memory 101 * 102 * RT-Thread operating system supports two types memory management: 103 * - Static memory pool management 104 * - Dynamic memory heap management. 105 * 106 * The time to allocate a memory block from the memory pool is determinant. When 107 * the memory pool is empty, the allocated thread can be blocked (or immediately return, 108 * or waiting for sometime to return, which are determined by a timeout parameter). 109 * When other thread releases memory blocks to this memory pool, the blocked thread is 110 * wake up. 111 * 112 * There are two methods in dynamic memory heap management, one is used for small memory, 113 * such as less than 1MB. Another is a SLAB like memory management, which is suitable 114 * for large memory system. All of them has no real-time character. 115 */ 116 117 /** 118 * @defgroup Device Device System 119 * @brief device I/O subsystem 120 * 121 * The Device System is designed as simple and minimum layer to help communication between 122 * applications and drivers. 123 * 124 * The Device System provide five interfaces to driver: 125 * - open, open a device 126 * - close, close a device 127 * - read, read some data from a device 128 * - write, write some data to a device 129 * - control, send some control command to a device 130 */ 131 132 /** 133 * @defgroup Hook Runtime Trace and Record 134 * @brief the hook function set in runtime 135 * 136 * In order to trace and record RT-Thread activity in runtime, a hook mechanism 137 * is introduced. 138 * 139 * The hooks are a series of routines, which are invoked in some special checkpoints. 140 * The hook routines include: 141 * - object hook, invoked at object created, deleted, taken and put etc. 142 * - scheduler hook, invoked at thread switch and idle thread loop. 143 * - memory hook, invoked when allocate or free memory block. 144 * - timer hook, invoked when timer is timeout. 145 */ 146 147 /** 148 * @defgroup KernelService Other useful kernel service 149 * @brief other useful service in the kernel 150 */ 151 152 /** 153 * @defgroup Error Error Code 154 * @brief error code 155 * 156 * The error code is defined to identify which kind of error occurs. When some 157 * bad things happen, the current thread's errno will be set. see @ref _rt_errno 158 */ 159 160 /*@}*/ 161