Changeset c1b8ad4 in mainline
- Timestamp:
- 2016-03-11T13:12:24Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c064b58
- Parents:
- d4d8255
- git-author:
- Umute P. Fletcher <conti.ma@…> (2016-03-11 13:12:24)
- git-committer:
- Jiri Svoboda <jiri@…> (2016-03-11 13:12:24)
- Location:
- kernel/generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/adt/btree.h
rd4d8255 rc1b8ad4 108 108 109 109 extern void btree_print(btree_t *t); 110 111 extern unsigned long btree_count(btree_t *t); 112 110 113 #endif 111 114 -
kernel/generic/src/adt/btree.c
rd4d8255 rc1b8ad4 1045 1045 } 1046 1046 1047 /** Return number of B-tree elements. 1048 * 1049 * @param t B-tree to count. 1050 * @return Return number of B-tree elements. 1051 * 1052 */ 1053 unsigned long btree_count(btree_t *t) 1054 { 1055 unsigned long count = 0; 1056 1057 list_foreach(t->leaf_list, leaf_link, btree_node_t, node) { 1058 count += node->keys; 1059 } 1060 1061 return count; 1062 } 1063 1047 1064 /** @} 1048 1065 */
Note:
See TracChangeset
for help on using the changeset viewer.