Changeset 077842c in mainline


Ignore:
Timestamp:
2018-09-07T15:46:41Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e9d2905
Parents:
78de83de
Message:

Convert atomic_t to atomic_size_t (1): remove PRIua macro

Location:
kernel
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/atomic.h

    r78de83de r077842c  
    4242typedef size_t atomic_count_t;
    4343typedef ssize_t atomic_signed_t;
    44 
    45 #define PRIua  "zu"          /**< Format for atomic_count_t. */
    4644
    4745typedef struct {
  • kernel/generic/src/proc/scheduler.c

    r78de83de r077842c  
    530530        log(LF_OTHER, LVL_DEBUG,
    531531            "cpu%u: tid %" PRIu64 " (priority=%d, ticks=%" PRIu64
    532             ", nrdy=%" PRIua ")", CPU->id, THREAD->tid, THREAD->priority,
     532            ", nrdy=%zu)", CPU->id, THREAD->tid, THREAD->priority,
    533533            THREAD->ticks, atomic_get(&CPU->nrdy));
    534534#endif
     
    739739                irq_spinlock_lock(&cpus[cpu].lock, true);
    740740
    741                 printf("cpu%u: address=%p, nrdy=%" PRIua ", needs_relink=%zu\n",
     741                printf("cpu%u: address=%p, nrdy=%zu, needs_relink=%zu\n",
    742742                    cpus[cpu].id, &cpus[cpu], atomic_get(&cpus[cpu].nrdy),
    743743                    cpus[cpu].needs_relink);
  • kernel/generic/src/proc/task.c

    r78de83de r077842c  
    619619#ifdef __32_BITS__
    620620        if (*additional)
    621                 printf("%-8" PRIu64 " %9" PRIua, task->taskid,
     621                printf("%-8" PRIu64 " %9zu", task->taskid,
    622622                    atomic_get(&task->refcount));
    623623        else
     
    631631        if (*additional)
    632632                printf("%-8" PRIu64 " %9" PRIu64 "%c %9" PRIu64 "%c "
    633                     "%9" PRIua "\n", task->taskid, ucycles, usuffix, kcycles,
     633                    "%9zu\n", task->taskid, ucycles, usuffix, kcycles,
    634634                    ksuffix, atomic_get(&task->refcount));
    635635        else
  • kernel/test/mm/falloc2.c

    r78de83de r077842c  
    131131
    132132        while (atomic_get(&thread_count) > 0) {
    133                 TPRINTF("Threads left: %" PRIua "\n",
     133                TPRINTF("Threads left: %zu\n",
    134134                    atomic_get(&thread_count));
    135135                thread_sleep(1);
  • kernel/test/synch/semaphore1.c

    r78de83de r077842c  
    8888                producers = (4 - i) * PRODUCERS;
    8989
    90                 TPRINTF("Creating %" PRIua " consumers and %" PRIua " producers...",
     90                TPRINTF("Creating %zu consumers and %zu producers...",
    9191                    consumers, producers);
    9292
     
    116116
    117117                while ((items_consumed.count != consumers) || (items_produced.count != producers)) {
    118                         TPRINTF("%" PRIua " consumers remaining, %" PRIua " producers remaining\n",
     118                        TPRINTF("%zu consumers remaining, %zu producers remaining\n",
    119119                            consumers - items_consumed.count, producers - items_produced.count);
    120120                        thread_sleep(1);
  • kernel/test/synch/workq-test-core.h

    r78de83de r077842c  
    191191        for (int i = 0; i < WAVES; ++i) {
    192192                if (atomic_get(&call_cnt[i]) == exp_call_cnt) {
    193                         TPRINTF("Ok: %" PRIua " calls in wave %d, as expected.\n",
     193                        TPRINTF("Ok: %zu calls in wave %d, as expected.\n",
    194194                            atomic_get(&call_cnt[i]), i);
    195195                } else {
    196196                        success = false;
    197                         TPRINTF("Error: %" PRIua " calls in wave %d, but %zu expected.\n",
     197                        TPRINTF("Error: %zu calls in wave %d, but %zu expected.\n",
    198198                            atomic_get(&call_cnt[i]), i, exp_call_cnt);
    199199                }
  • kernel/test/thread/thread1.c

    r78de83de r077842c  
    7777        atomic_set(&finish, 0);
    7878        while (atomic_get(&threads_finished) < total) {
    79                 TPRINTF("Threads left: %" PRIua "\n", total - atomic_get(&threads_finished));
     79                TPRINTF("Threads left: %zu\n", total - atomic_get(&threads_finished));
    8080                thread_sleep(1);
    8181        }
Note: See TracChangeset for help on using the changeset viewer.