1 /* 2 * Copyright (C) 2015-2017 Alibaba Group Holding Limited 3 */ 4 5 #ifndef K_CFS_H 6 #define K_CFS_H 7 8 #include "k_rbtree.h" 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 /** @addtogroup aos_rhino cfs 15 * Completely Fair Scheduler. 16 * 17 * @{ 18 */ 19 20 typedef struct cfs_node_s { 21 struct k_rbtree_node_t rbt_node; /* rbttree node */ 22 lr_timer_t key; /* key */ 23 } cfs_node; 24 25 void cfs_node_insert(cfs_node *node, lr_timer_t key); 26 void cfs_node_del(cfs_node *node); 27 lr_timer_t cfs_node_min_get(void); 28 29 /** @} */ 30 31 #ifdef __cplusplus 32 } 33 #endif 34 35 #endif /* K_CFS_H */ 36 37