Changeset 55b77d9 in mainline for kernel/generic/src/sysinfo/stats.c


Ignore:
Timestamp:
2011-06-17T20:39:16Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8f164724
Parents:
98caf49
Message:

Separate list_t typedef from link_t (kernel part).

  • list_t represents lists
  • Use list_first(), list_last(), list_empty() where appropriate
  • Use list_foreach() where possible
  • Replace improper uses of list_prepend() with list_insert_after()
  • Replace improper uses of list_append() with list_insert_before()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/sysinfo/stats.c

    r98caf49 r55b77d9  
    173173       
    174174        /* Walk the B+ tree and count pages */
    175         link_t *cur;
    176         for (cur = as->as_area_btree.leaf_head.next;
    177             cur != &as->as_area_btree.leaf_head; cur = cur->next) {
     175        list_foreach(as->as_area_btree.leaf_list, cur) {
    178176                btree_node_t *node =
    179177                    list_get_instance(cur, btree_node_t, leaf_link);
     
    218216       
    219217        /* Walk the B+ tree and count pages */
    220         link_t *cur;
    221         for (cur = as->as_area_btree.leaf_head.next;
    222             cur != &as->as_area_btree.leaf_head; cur = cur->next) {
     218        list_foreach(as->as_area_btree.leaf_list, cur) {
    223219                btree_node_t *node =
    224220                    list_get_instance(cur, btree_node_t, leaf_link);
Note: See TracChangeset for help on using the changeset viewer.