1 #ifndef _KE_ENV_H_ 2 #define _KE_ENV_H_ 3 4 /** 5 **************************************************************************************** 6 * @addtogroup ENV Environment 7 * @ingroup KERNEL 8 * @brief Kernel Environment 9 * 10 * @{ 11 **************************************************************************************** 12 */ 13 14 /* 15 * INCLUDE FILES 16 **************************************************************************************** 17 */ 18 #include "rwip_config.h" // stack configuration 19 #include "ke_event.h" // kernel event 20 #include "co_list.h" // kernel queue definition 21 22 // forward declaration 23 struct mblock_free; 24 25 /// Kernel environment definition 26 struct ke_env_tag 27 { 28 /// Queue of sent messages but not yet delivered to receiver 29 struct co_list queue_sent; 30 /// Queue of messages delivered but not consumed by receiver 31 struct co_list queue_saved; 32 /// Queue of timers 33 struct co_list queue_timer; 34 35 /// Root pointer = pointer to first element of heap linked lists 36 struct mblock_free * heap[KE_MEM_BLOCK_MAX]; 37 /// Size of heaps 38 uint16_t heap_size[KE_MEM_BLOCK_MAX]; 39 40 #if (KE_PROFILING) 41 /// Size of heap used 42 uint16_t heap_used[KE_MEM_BLOCK_MAX]; 43 /// Maximum heap memory used 44 uint32_t max_heap_used; 45 #endif //KE_PROFILING 46 }; 47 48 /// Kernel environment 49 extern struct ke_env_tag ke_env; 50 51 /// @} ENV 52 53 #endif // _KE_ENV_H_ 54