Changeset bf61d3a in mainline for kernel/generic/src


Ignore:
Timestamp:
2010-11-26T01:34:21Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
273b958
Parents:
4b9a410 (diff), 7e752b2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge compile-time printf() argument checking, fixes of actual printf() arguments and related modifications

Location:
kernel/generic/src
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/cmd.c

    r4b9a410 rbf61d3a  
    554554        }
    555555       
     556        unsigned int _len = (unsigned int) len;
     557        if ((_len != len) || (((int) _len) < 0)) {
     558                printf("Command length overflow\n");
     559                return 1;
     560        }
     561       
    556562        for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) {
    557563                cmd_info_t *hlp;
     
    559565               
    560566                spinlock_lock(&hlp->lock);
    561                 printf("%-*s %s\n", len, hlp->name, hlp->description);
     567                printf("%-*s %s\n", _len, hlp->name, hlp->description);
    562568                spinlock_unlock(&hlp->lock);
    563569        }
     
    668674                fnc = (unative_t (*)(void)) arch_construct_function(&fptr,
    669675                    (void *) symaddr, (void *) cmd_call0);
    670                 printf("Calling %s() (%p)\n", symbol, symaddr);
     676                printf("Calling %s() (%p)\n", symbol, (void *) symaddr);
    671677                printf("Result: %#" PRIxn "\n", fnc());
    672678                interrupts_restore(ipl);
     
    685691         */
    686692       
    687         size_t i;
     693        unsigned int i;
    688694        for (i = 0; i < config.cpu_count; i++) {
    689695                if (!cpus[i].active)
     
    697703                        irq_spinlock_unlock(&thread->lock, true);
    698704                       
    699                         printf("cpu%" PRIs ": ", i);
     705                        printf("cpu%u: ", i);
    700706                       
    701707                        thread_ready(thread);
     
    703709                        thread_detach(thread);
    704710                } else
    705                         printf("Unable to create thread for cpu%" PRIs "\n", i);
     711                        printf("Unable to create thread for cpu%u\n", i);
    706712        }
    707713       
     
    731737
    732738                ipl = interrupts_disable();
    733                 fnc = (unative_t (*)(unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call1);
    734                 printf("Calling f(%#" PRIxn "): %p: %s\n", arg1, symaddr, symbol);
     739                fnc = (unative_t (*)(unative_t, ...))
     740                    arch_construct_function(&fptr, (void *) symaddr,
     741                    (void *) cmd_call1);
     742                printf("Calling f(%#" PRIxn "): %p: %s\n", arg1,
     743                    (void *) symaddr, symbol);
    735744                printf("Result: %#" PRIxn "\n", fnc(arg1));
    736745                interrupts_restore(ipl);
     
    765774
    766775                ipl = interrupts_disable();
    767                 fnc = (unative_t (*)(unative_t, unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call2);
     776                fnc = (unative_t (*)(unative_t, unative_t, ...))
     777                    arch_construct_function(&fptr, (void *) symaddr,
     778                    (void *) cmd_call2);
    768779                printf("Calling f(%#" PRIxn ", %#" PRIxn "): %p: %s\n",
    769                        arg1, arg2, symaddr, symbol);
     780                       arg1, arg2, (void *) symaddr, symbol);
    770781                printf("Result: %#" PRIxn "\n", fnc(arg1, arg2));
    771782                interrupts_restore(ipl);
     
    800811
    801812                ipl = interrupts_disable();
    802                 fnc = (unative_t (*)(unative_t, unative_t, unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call3);
    803                 printf("Calling f(%#" PRIxn ",%#" PRIxn ", %#" PRIxn "): %p: %s\n",
    804                        arg1, arg2, arg3, symaddr, symbol);
     813                fnc = (unative_t (*)(unative_t, unative_t, unative_t, ...))
     814                    arch_construct_function(&fptr, (void *) symaddr,
     815                    (void *) cmd_call3);
     816                printf("Calling f(%#" PRIxn ",%#" PRIxn ", %#" PRIxn "): %p: %s\n",
     817                       arg1, arg2, arg3, (void *) symaddr, symbol);
    805818                printf("Result: %#" PRIxn "\n", fnc(arg1, arg2, arg3));
    806819                interrupts_restore(ipl);
     
    875888       
    876889        if (rc == ENOENT)
    877                 printf("Symbol %s not found.\n", argv->buffer);
     890                printf("Symbol %s not found.\n", (char *) argv->buffer);
    878891        else if (rc == EINVAL)
    879892                printf("Invalid address.\n");
     
    884897                if (pointer)
    885898                        addr = *(uintptr_t *) addr;
    886                 printf("Writing %#" PRIx64 " -> %p\n", arg1, addr);
     899                printf("Writing %#" PRIx32" -> %p\n", arg1, (void *) addr);
    887900                *(uint32_t *) addr = arg1;
    888901        } else
     
    11721185        }
    11731186       
     1187        unsigned int _len = (unsigned int) len;
     1188        if ((_len != len) || (((int) _len) < 0)) {
     1189                printf("Command length overflow\n");
     1190                return;
     1191        }
     1192       
    11741193        for (test = tests; test->name != NULL; test++)
    1175                 printf("%-*s %s%s\n", len, test->name, test->desc, (test->safe ? "" : " (unsafe)"));
    1176        
    1177         printf("%-*s Run all safe tests\n", len, "*");
     1194                printf("%-*s %s%s\n", _len, test->name, test->desc,
     1195                    (test->safe ? "" : " (unsafe)"));
     1196       
     1197        printf("%-*s Run all safe tests\n", _len, "*");
    11781198}
    11791199
  • kernel/generic/src/cpu/cpu.c

    r4b9a410 rbf61d3a  
    107107void cpu_list(void)
    108108{
    109         size_t i;
     109        unsigned int i;
    110110       
    111111        for (i = 0; i < config.cpu_count; i++) {
  • kernel/generic/src/debug/debug.c

    r4b9a410 rbf61d3a  
    5252        if (symtab_name_lookup((uintptr_t) call_site, &call_site_sym,
    5353            &call_site_off) == EOK)
    54                 printf("%s+%" PRIp "->%s\n", call_site_sym, call_site_off,
    55                     fn_sym);
     54                printf("%s()+%p->%s()\n", call_site_sym,
     55                    (void *) call_site_off, fn_sym);
    5656        else
    57                 printf("->%s\n", fn_sym);
     57                printf("->%s()\n", fn_sym);
    5858}
    5959
     
    6767        if (symtab_name_lookup((uintptr_t) call_site, &call_site_sym,
    6868            &call_site_off) == EOK)
    69                 printf("%s+%" PRIp "<-%s\n", call_site_sym, call_site_off,
    70                     fn_sym);
     69                printf("%s()+%p<-%s()\n", call_site_sym,
     70                    (void *) call_site_off, fn_sym);
    7171        else
    72                 printf("<-%s\n", fn_sym);
     72                printf("<-%s()\n", fn_sym);
    7373}
    7474
  • kernel/generic/src/debug/panic.c

    r4b9a410 rbf61d3a  
    4242#include <interrupt.h>
    4343
     44#define BANNER_LEFT   "######>"
     45#define BANNER_RIGHT  "<######"
     46
    4447void panic_common(panic_category_t cat, istate_t *istate, int access,
    4548    uintptr_t address, const char *fmt, ...)
    4649{
    4750        va_list args;
    48 
     51       
    4952        silent = false;
    50 
    51         printf("\nKERNEL PANIC ");
     53       
     54        printf("\n%s Kernel panic ", BANNER_LEFT);
    5255        if (CPU)
    53                 printf("ON cpu%d ", CPU->id);
    54         printf("DUE TO ");
    55 
     56                printf("on cpu%u ", CPU->id);
     57        printf("due to ");
     58       
    5659        va_start(args, fmt);
    5760        if (cat == PANIC_ASSERT) {
    58                 printf("A FAILED ASSERTION:\n");
     61                printf("a failed assertion: %s\n", BANNER_RIGHT);
    5962                vprintf(fmt, args);
    6063                printf("\n");
    6164        } else if (cat == PANIC_BADTRAP) {
    62                 printf("BAD TRAP %ld.\n", address);
     65                printf("bad trap %" PRIun ". %s\n", address,
     66                    BANNER_RIGHT);
    6367                if (fmt) {
    6468                        vprintf(fmt, args);
     
    6670                }
    6771        } else if (cat == PANIC_MEMTRAP) {
    68                 printf("A BAD MEMORY ACCESS WHILE ");
     72                printf("a bad memory access while ");
    6973                if (access == PF_ACCESS_READ)
    70                         printf("LOADING FROM");
     74                        printf("loading from");
    7175                else if (access == PF_ACCESS_WRITE)
    72                         printf("STORING TO");
     76                        printf("storing to");
    7377                else if (access == PF_ACCESS_EXEC)
    74                         printf("BRANCHING TO");
     78                        printf("branching to");
    7579                else
    76                         printf("REFERENCING");
    77                 printf(" ADDRESS %p.\n", address);
     80                        printf("referencing");
     81                printf(" address %p. %s\n", (void *) address,
     82                    BANNER_RIGHT);
    7883                if (fmt) {
    7984                        vprintf(fmt, args);
     
    8186                }
    8287        } else {
    83                 printf("THE FOLLOWING REASON:\n");
     88                printf("the following reason: %s\n",
     89                    BANNER_RIGHT);
    8490                vprintf(fmt, args);
    8591                printf("\n");
    8692        }
    8793        va_end(args);
    88 
     94       
    8995        printf("\n");
    90 
     96       
    9197        if (istate) {
    9298                istate_decode(istate);
    9399                printf("\n");
    94100        }
    95 
     101       
    96102        stack_trace();
    97103        halt();
  • kernel/generic/src/debug/stacktrace.c

    r4b9a410 rbf61d3a  
    4141#define STACK_FRAMES_MAX        20
    4242
    43 void
    44 stack_trace_ctx(stack_trace_ops_t *ops, stack_trace_context_t *ctx)
     43void stack_trace_ctx(stack_trace_ops_t *ops, stack_trace_context_t *ctx)
    4544{
    4645        int cnt = 0;
     
    5453                if (ops->symbol_resolve &&
    5554                    ops->symbol_resolve(ctx->pc, &symbol, &offset)) {
    56                         if (offset)
    57                                 printf("%p: %s+%" PRIp "()\n",
    58                                     ctx->fp, symbol, offset);
     55                        if (offset)
     56                                printf("%p: %s()+%p\n", (void *) ctx->fp,
     57                                    symbol, (void *) offset);
    5958                        else
    60                                 printf("%p: %s()\n",
    61                                     ctx->fp, symbol);
    62                 } else {
    63                         printf("%p: %p()\n", ctx->fp, ctx->pc);
    64                 }
     59                                printf("%p: %s()\n", (void *) ctx->fp, symbol);
     60                } else
     61                        printf("%p: %p()\n", (void *) ctx->fp, (void *) ctx->pc);
     62               
    6563                if (!ops->return_address_get(ctx, &pc))
    6664                        break;
     65               
    6766                if (!ops->frame_pointer_prev(ctx, &fp))
    6867                        break;
     68               
    6969                ctx->fp = fp;
    7070                ctx->pc = pc;
  • kernel/generic/src/debug/symtab.c

    r4b9a410 rbf61d3a  
    192192                uintptr_t addr = uint64_t_le2host(symbol_table[pos].address_le);
    193193                char *realname = symbol_table[pos].symbol_name;
    194                 printf("%p: %s\n", addr, realname);
     194                printf("%p: %s\n", (void *) addr, realname);
    195195                pos++;
    196196        }
  • kernel/generic/src/interrupt/interrupt.c

    r4b9a410 rbf61d3a  
    176176        printf("Task %s (%" PRIu64 ") killed due to an exception at "
    177177            "program counter %p.\n", TASK->name, TASK->taskid,
    178             istate_get_pc(istate));
     178            (void *) istate_get_pc(istate));
    179179       
    180180        stack_trace_istate(istate);
  • kernel/generic/src/ipc/ipc.c

    r4b9a410 rbf61d3a  
    702702        for (i = 0; i < IPC_MAX_PHONES; i++) {
    703703                if (SYNCH_FAILED(mutex_trylock(&task->phones[i].lock))) {
    704                         printf("%d: mutex busy\n", i);
     704                        printf("%zu: mutex busy\n", i);
    705705                        continue;
    706706                }
    707707               
    708708                if (task->phones[i].state != IPC_PHONE_FREE) {
    709                         printf("%" PRIs ": ", i);
     709                        printf("%zu: ", i);
    710710                       
    711711                        switch (task->phones[i].state) {
  • kernel/generic/src/main/kinit.c

    r4b9a410 rbf61d3a  
    129129                 * For each CPU, create its load balancing thread.
    130130                 */
    131                 size_t i;
     131                unsigned int i;
    132132               
    133133                for (i = 0; i < config.cpu_count; i++) {
     
    139139                                thread_ready(thread);
    140140                        } else
    141                                 printf("Unable to create kcpulb thread for cpu" PRIs "\n", i);
     141                                printf("Unable to create kcpulb thread for cpu%u\n", i);
    142142                }
    143143        }
     
    179179        for (i = 0; i < init.cnt; i++) {
    180180                if (init.tasks[i].addr % FRAME_SIZE) {
    181                         printf("init[%" PRIs "].addr is not frame aligned\n", i);
     181                        printf("init[%zu].addr is not frame aligned\n", i);
    182182                        programs[i].task = NULL;
    183183                        continue;
     
    219219                       
    220220                        if (rd != RE_OK)
    221                                 printf("Init binary %" PRIs " not used (error %d)\n", i, rd);
     221                                printf("Init binary %zu not used (error %d)\n", i, rd);
    222222                }
    223223        }
  • kernel/generic/src/main/main.c

    r4b9a410 rbf61d3a  
    183183        version_print();
    184184       
    185         LOG("\nconfig.base=%p config.kernel_size=%" PRIs
    186             "\nconfig.stack_base=%p config.stack_size=%" PRIs,
     185        LOG("\nconfig.base=%p config.kernel_size=%zu"
     186            "\nconfig.stack_base=%p config.stack_size=%zu",
    187187            config.base, config.kernel_size, config.stack_base,
    188188            config.stack_size);
     
    225225        slab_enable_cpucache();
    226226       
    227         printf("Detected %" PRIs " CPU(s), %" PRIu64" MiB free memory\n",
     227        printf("Detected %u CPU(s), %" PRIu64 " MiB free memory\n",
    228228            config.cpu_count, SIZE2MB(zones_total_size()));
    229229       
     
    241241                size_t i;
    242242                for (i = 0; i < init.cnt; i++)
    243                         LOG("init[%" PRIs "].addr=%p, init[%" PRIs
    244                             "].size=%" PRIs, i, init.tasks[i].addr, i,
    245                             init.tasks[i].size);
     243                        LOG("init[%zu].addr=%p, init[%zu].size=%zu",
     244                            i, init.tasks[i].addr, i, init.tasks[i].size);
    246245        } else
    247246                printf("No init binaries found.\n");
  • kernel/generic/src/mm/as.c

    r4b9a410 rbf61d3a  
    18111811        }
    18121812       
    1813         panic("Inconsistency detected while adding %" PRIs " pages of used "
    1814             "space at %p.", count, page);
     1813        panic("Inconsistency detected while adding %zu pages of used "
     1814            "space at %p.", count, (void *) page);
    18151815}
    18161816
     
    19911991       
    19921992error:
    1993         panic("Inconsistency detected while removing %" PRIs " pages of used "
    1994             "space from %p.", count, page);
     1993        panic("Inconsistency detected while removing %zu pages of used "
     1994            "space from %p.", count, (void *) page);
    19951995}
    19961996
     
    21052105                       
    21062106                        mutex_lock(&area->lock);
    2107                         printf("as_area: %p, base=%p, pages=%" PRIs
    2108                             " (%p - %p)\n", area, area->base, area->pages,
    2109                             area->base, area->base + FRAMES2SIZE(area->pages));
     2107                        printf("as_area: %p, base=%p, pages=%zu"
     2108                            " (%p - %p)\n", area, (void *) area->base,
     2109                            area->pages, (void *) area->base,
     2110                            (void *) (area->base + FRAMES2SIZE(area->pages)));
    21102111                        mutex_unlock(&area->lock);
    21112112                }
  • kernel/generic/src/mm/frame.c

    r4b9a410 rbf61d3a  
    145145                            (!iswithin(zones.info[i].base, zones.info[i].count,
    146146                            base, count))) {
    147                                 printf("Zone (%p, %p) overlaps with previous zone (%p, %p)!\n",
    148                                     PFN2ADDR(base), PFN2ADDR(count),
    149                                     PFN2ADDR(zones.info[i].base),
    150                                     PFN2ADDR(zones.info[i].count));
     147                                printf("Zone (%p, %p) overlaps "
     148                                    "with previous zone (%p %p)!\n",
     149                                    (void *) PFN2ADDR(base), (void *) PFN2ADDR(count),
     150                                    (void *) PFN2ADDR(zones.info[i].base),
     151                                    (void *) PFN2ADDR(zones.info[i].count));
    151152                        }
    152153                       
     
    10491050               
    10501051#ifdef CONFIG_DEBUG
    1051                 printf("Thread %" PRIu64 " waiting for %" PRIs " frames, "
    1052                     "%" PRIs " available.\n", THREAD->tid, size, avail);
     1052                printf("Thread %" PRIu64 " waiting for %zu frames, "
     1053                    "%zu available.\n", THREAD->tid, size, avail);
    10531054#endif
    10541055               
     
    12971298                bool available = zone_flags_available(flags);
    12981299               
    1299                 printf("%-4" PRIs, i);
     1300                printf("%-4zu", i);
    13001301               
    13011302#ifdef __32_BITS__
    1302                 printf("  %10p", base);
     1303                printf("  %p", (void *) base);
    13031304#endif
    13041305               
    13051306#ifdef __64_BITS__
    1306                 printf(" %18p", base);
     1307                printf(" %p", (void *) base);
    13071308#endif
    13081309               
    1309                 printf(" %12" PRIs " %c%c%c      ", count,
     1310                printf(" %12zu %c%c%c      ", count,
    13101311                    available ? 'A' : ' ',
    13111312                    (flags & ZONE_RESERVED) ? 'R' : ' ',
     
    13131314               
    13141315                if (available)
    1315                         printf("%14" PRIs " %14" PRIs,
     1316                        printf("%14zu %14zu",
    13161317                            free_count, busy_count);
    13171318               
     
    13541355        bool available = zone_flags_available(flags);
    13551356       
    1356         printf("Zone number:       %" PRIs "\n", znum);
    1357         printf("Zone base address: %p\n", base);
    1358         printf("Zone size:         %" PRIs " frames (%" PRIs " KiB)\n", count,
     1357        printf("Zone number:       %zu\n", znum);
     1358        printf("Zone base address: %p\n", (void *) base);
     1359        printf("Zone size:         %zu frames (%zu KiB)\n", count,
    13591360            SIZE2KB(FRAMES2SIZE(count)));
    13601361        printf("Zone flags:        %c%c%c\n",
     
    13641365       
    13651366        if (available) {
    1366                 printf("Allocated space:   %" PRIs " frames (%" PRIs " KiB)\n",
     1367                printf("Allocated space:   %zu frames (%zu KiB)\n",
    13671368                    busy_count, SIZE2KB(FRAMES2SIZE(busy_count)));
    1368                 printf("Available space:   %" PRIs " frames (%" PRIs " KiB)\n",
     1369                printf("Available space:   %zu frames (%zu KiB)\n",
    13691370                    free_count, SIZE2KB(FRAMES2SIZE(free_count)));
    13701371        }
  • kernel/generic/src/mm/slab.c

    r4b9a410 rbf61d3a  
    890890                irq_spinlock_unlock(&slab_cache_lock, true);
    891891               
    892                 printf("%-18s %8" PRIs " %8u %8" PRIs " %8ld %8ld %8ld %-5s\n",
     892                printf("%-18s %8zu %8u %8zu %8ld %8ld %8ld %-5s\n",
    893893                    name, size, (1 << order), objects, allocated_slabs,
    894894                    cached_objs, allocated_objs,
  • kernel/generic/src/printf/printf_core.c

    r4b9a410 rbf61d3a  
    8383        PrintfQualifierLong,
    8484        PrintfQualifierLongLong,
    85         PrintfQualifierPointer
     85        PrintfQualifierPointer,
     86        PrintfQualifierSize
    8687} qualifier_t;
    8788
     
    553554 *  - ""   Signed or unsigned int (default value).@n
    554555 *  - "l"  Signed or unsigned long int.@n
    555  *         If conversion is "c", the character is wchar_t (wide character).@n
     556 *         If conversion is "c", the character is wint_t (wide character).@n
    556557 *         If conversion is "s", the string is wchar_t * (wide string).@n
    557558 *  - "ll" Signed or unsigned long long int.@n
     559 *  - "z"  Signed or unsigned ssize_t or site_t.@n
    558560 *
    559561 * CONVERSION:@n
     
    737739                                }
    738740                                break;
     741                        case 'z':
     742                                qualifier = PrintfQualifierSize;
     743                                i = nxt;
     744                                uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
     745                                break;
    739746                        default:
    740747                                /* Default type */
     
    764771                        case 'c':
    765772                                if (qualifier == PrintfQualifierLong)
    766                                         retval = print_wchar(va_arg(ap, wchar_t), width, flags, ps);
     773                                        retval = print_wchar(va_arg(ap, wint_t), width, flags, ps);
    767774                                else
    768775                                        retval = print_char(va_arg(ap, unsigned int), width, flags, ps);
     
    850857                                precision = size << 1;
    851858                                number = (uint64_t) (uintptr_t) va_arg(ap, void *);
     859                                break;
     860                        case PrintfQualifierSize:
     861                                size = sizeof(size_t);
     862                                number = (uint64_t) va_arg(ap, size_t);
    852863                                break;
    853864                        default:
  • kernel/generic/src/proc/program.c

    r4b9a410 rbf61d3a  
    145145               
    146146                program_loader = image_addr;
    147                 LOG("Registered program loader at 0x%" PRIp,
    148                     image_addr);
     147                LOG("Registered program loader at %p",
     148                    (void *) image_addr);
    149149               
    150150                return EOK;
  • kernel/generic/src/proc/scheduler.c

    r4b9a410 rbf61d3a  
    727727                irq_spinlock_lock(&cpus[cpu].lock, true);
    728728               
    729                 printf("cpu%u: address=%p, nrdy=%ld, needs_relink=%" PRIs "\n",
     729                printf("cpu%u: address=%p, nrdy=%" PRIua ", needs_relink=%zu\n",
    730730                    cpus[cpu].id, &cpus[cpu], atomic_get(&cpus[cpu].nrdy),
    731731                    cpus[cpu].needs_relink);
  • kernel/generic/src/proc/task.c

    r4b9a410 rbf61d3a  
    478478#ifdef __32_BITS__
    479479        if (*additional)
    480                 printf("%-8" PRIu64 " %9lu %7lu", task->taskid,
     480                printf("%-8" PRIu64 " %9" PRIua " %7" PRIua, task->taskid,
    481481                    atomic_get(&task->refcount), atomic_get(&task->active_calls));
    482482        else
     
    489489#ifdef __64_BITS__
    490490        if (*additional)
    491                 printf("%-8" PRIu64 " %9" PRIu64 "%c %9" PRIu64 "%c %9lu %7lu",
     491                printf("%-8" PRIu64 " %9" PRIu64 "%c %9" PRIu64 "%c "
     492                    "%9" PRIua " %7" PRIua,
    492493                    task->taskid, ucycles, usuffix, kcycles, ksuffix,
    493494                    atomic_get(&task->refcount), atomic_get(&task->active_calls));
     
    501502                for (i = 0; i < IPC_MAX_PHONES; i++) {
    502503                        if (task->phones[i].callee)
    503                                 printf(" %" PRIs ":%p", i, task->phones[i].callee);
     504                                printf(" %zu:%p", i, task->phones[i].callee);
    504505                }
    505506                printf("\n");
  • kernel/generic/src/synch/spinlock.c

    r4b9a410 rbf61d3a  
    102102               
    103103                if (i++ > DEADLOCK_THRESHOLD) {
    104                         printf("cpu%u: looping on spinlock %" PRIp ":%s, "
    105                             "caller=%" PRIp "(%s)\n", CPU->id, lock, lock->name,
    106                             CALLER, symtab_fmt_name_lookup(CALLER));
     104                        printf("cpu%u: looping on spinlock %p:%s, "
     105                            "caller=%p (%s)\n", CPU->id, lock, lock->name,
     106                            (void *) CALLER, symtab_fmt_name_lookup(CALLER));
    107107                       
    108108                        i = 0;
  • kernel/generic/src/sysinfo/sysinfo.c

    r4b9a410 rbf61d3a  
    494494                        break;
    495495                case SYSINFO_VAL_DATA:
    496                         printf("+ %s (%" PRIs" bytes)\n", cur->name,
     496                        printf("+ %s (%zu bytes)\n", cur->name,
    497497                            cur->val.data.size);
    498498                        break;
     
    505505                        /* N.B.: No data was actually returned (only a dry run) */
    506506                        (void) cur->val.fn_data(cur, &size, true);
    507                         printf("+ %s (%" PRIs" bytes) [generated]\n", cur->name,
     507                        printf("+ %s (%zu bytes) [generated]\n", cur->name,
    508508                            size);
    509509                        break;
Note: See TracChangeset for help on using the changeset viewer.