Changeset cd8ad52 in mainline for kernel/test/mm/falloc2.c


Ignore:
Timestamp:
2008-06-03T14:58:05Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b63f8569
Parents:
7ac426e
Message:

proper printf formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/mm/falloc2.c

    r7ac426e rcd8ad52  
    5959        if (frames == NULL) {
    6060                if (!sh_quiet)
    61                         printf("Thread #%llu (cpu%d): Unable to allocate frames\n", THREAD->tid, CPU->id);
     61                        printf("Thread #%" PRIu64 " (cpu%u): Unable to allocate frames\n", THREAD->tid, CPU->id);
    6262                atomic_inc(&thread_fail);
    6363                atomic_dec(&thread_count);
     
    7070                for (order = 0; order <= MAX_ORDER; order++) {
    7171                        if (!sh_quiet)
    72                                 printf("Thread #%llu (cpu%d): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order);
     72                                printf("Thread #%" PRIu64 " (cpu%u): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order);
    7373                       
    7474                        allocated = 0;
     
    8383                       
    8484                        if (!sh_quiet)
    85                                 printf("Thread #%llu (cpu%d): %d blocks allocated.\n", THREAD->tid, CPU->id, allocated);
     85                                printf("Thread #%" PRIu64 " (cpu%u): %d blocks allocated.\n", THREAD->tid, CPU->id, allocated);
    8686                       
    8787                        if (!sh_quiet)
    88                                 printf("Thread #%llu (cpu%d): Deallocating ... \n", THREAD->tid, CPU->id);
     88                                printf("Thread #%" PRIu64 " (cpu%u): Deallocating ... \n", THREAD->tid, CPU->id);
    8989                       
    9090                        for (i = 0; i < allocated; i++) {
     
    9292                                        if (((uint8_t *) frames[i])[k] != val) {
    9393                                                if (!sh_quiet)
    94                                                         printf("Thread #%llu (cpu%d): Unexpected data (%d) in block %p offset %#zx\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k);
     94                                                        printf("Thread #%" PRIu64 " (cpu%u): Unexpected data (%c) in block %p offset %#" PRIi "\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k);
    9595                                                atomic_inc(&thread_fail);
    9696                                                goto cleanup;
     
    101101                       
    102102                        if (!sh_quiet)
    103                                 printf("Thread #%llu (cpu%d): Finished run.\n", THREAD->tid, CPU->id);
     103                                printf("Thread #%" PRIu64 " (cpu%u): Finished run.\n", THREAD->tid, CPU->id);
    104104                }
    105105        }
     
    109109       
    110110        if (!sh_quiet)
    111                 printf("Thread #%llu (cpu%d): Exiting\n", THREAD->tid, CPU->id);
     111                printf("Thread #%" PRIu64 " (cpu%u): Exiting\n", THREAD->tid, CPU->id);
    112112        atomic_dec(&thread_count);
    113113}
     
    125125                if (!thrd) {
    126126                        if (!quiet)
    127                                 printf("Could not create thread %d\n", i);
     127                                printf("Could not create thread %u\n", i);
    128128                        break;
    129129                }
     
    133133        while (atomic_get(&thread_count) > 0) {
    134134                if (!quiet)
    135                         printf("Threads left: %d\n", atomic_get(&thread_count));
     135                        printf("Threads left: %ld\n", atomic_get(&thread_count));
    136136                thread_sleep(1);
    137137        }
Note: See TracChangeset for help on using the changeset viewer.