Changeset cf85e24c in mainline for generic


Ignore:
Timestamp:
2006-04-22T23:00:26Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
12c7f27
Parents:
e692a27
Message:

printf-related and other code cleanup

Location:
generic
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • generic/include/debug.h

    re692a27 rcf85e24c  
    5050 */
    5151#ifdef CONFIG_DEBUG
    52 #       define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s), caller=%P\n", #expr, CALLER); }
     52#       define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s), caller=%p\n", #expr, CALLER); }
    5353#else
    5454#       define ASSERT(expr)
  • generic/src/adt/btree.c

    re692a27 rcf85e24c  
    118118        if (!lnode) {
    119119                if (btree_search(t, key, &lnode)) {
    120                         panic("B-tree %P already contains key %d\n", t, key);
     120                        panic("B-tree %p already contains key %d\n", t, key);
    121121                }
    122122        }
     
    201201        if (!lnode) {
    202202                if (!btree_search(t, key, &lnode)) {
    203                         panic("B-tree %P does not contain key %d\n", t, key);
     203                        panic("B-tree %p does not contain key %d\n", t, key);
    204204                }
    205205        }
     
    501501                }
    502502        }
    503         panic("node %P does not contain key %d\n", node, key);
     503        panic("node %p does not contain key %d\n", node, key);
    504504}
    505505
     
    528528                }
    529529        }
    530         panic("node %P does not contain key %d\n", node, key);
     530        panic("node %p does not contain key %d\n", node, key);
    531531}
    532532
     
    670670                        return i - (int) (right != false);
    671671        }
    672         panic("node %P does not contain subtree %P\n", node, subtree);
     672        panic("node %p does not contain subtree %p\n", node, subtree);
    673673}
    674674
  • generic/src/main/main.c

    re692a27 rcf85e24c  
    177177
    178178        version_print();
    179         printf("%#zX: hardcoded_ktext_size=%zdK, hardcoded_kdata_size=%zdK\n",
    180                 config.base, hardcoded_ktext_size/1024, hardcoded_kdata_size/1024);
     179        printf("%#zx: hardcoded_ktext_size=%zdK, hardcoded_kdata_size=%zdK\n", config.base, hardcoded_ktext_size / 1024, hardcoded_kdata_size / 1024);
    181180
    182181        arch_pre_smp_init();
     
    197196       
    198197        for (i = 0; i < init.cnt; i++)
    199                 printf("init[%zd].addr=%P, init[%zd].size=%zd\n", i, init.tasks[i].addr, i, init.tasks[i].size);
     198                printf("init[%zd].addr=%p, init[%zd].size=%zd\n", i, init.tasks[i].addr, i, init.tasks[i].size);
    200199       
    201200        ipc_init();
  • generic/src/mm/frame.c

    re692a27 rcf85e24c  
    10291029                zone = zones.info[i];
    10301030                spinlock_lock(&zone->lock);
    1031                 printf("%d: %#X \t%zd\t\t%zd\n",i,PFN2ADDR(zone->base),
    1032                        zone->free_count, zone->busy_count);
     1031                printf("%d: %#x \t%zd\t\t%zd\n", i, PFN2ADDR(zone->base), zone->free_count, zone->busy_count);
    10331032                spinlock_unlock(&zone->lock);
    10341033        }
  • generic/src/mm/page.c

    re692a27 rcf85e24c  
    6464        int i, cnt, length;
    6565
    66         length = size + (s - (s & ~(PAGE_SIZE-1)));
    67         cnt = length/PAGE_SIZE + (length%PAGE_SIZE>0);
     66        length = size + (s - (s & ~(PAGE_SIZE - 1)));
     67        cnt = length / PAGE_SIZE + (length % PAGE_SIZE > 0);
    6868
    6969        for (i = 0; i < cnt; i++)
    70                 page_mapping_insert(AS_KERNEL, s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE);
     70                page_mapping_insert(AS_KERNEL, s + i * PAGE_SIZE, s + i * PAGE_SIZE, PAGE_NOT_CACHEABLE);
    7171
    7272}
  • generic/src/proc/scheduler.c

    re692a27 rcf85e24c  
    634634
    635635                spinlock_lock(&cpus[cpu].lock);
    636                 printf("cpu%d: address=%P, nrdy=%ld, needs_relink=%ld\n",
     636                printf("cpu%d: address=%p, nrdy=%ld, needs_relink=%ld\n",
    637637                       cpus[cpu].id, &cpus[cpu], atomic_get(&cpus[cpu].nrdy), cpus[cpu].needs_relink);
    638638               
Note: See TracChangeset for help on using the changeset viewer.