Changeset cd8ad52 in mainline for kernel/test/synch/rwlock4.c
- Timestamp:
- 2008-06-03T14:58:05Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b63f8569
- Parents:
- 7ac426e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/synch/rwlock4.c
r7ac426e rcd8ad52 75 75 76 76 if (!sh_quiet) 77 printf("cpu% d, tid %lluw+ (%d)\n", CPU->id, THREAD->tid, to);77 printf("cpu%u, tid %" PRIu64 " w+ (%d)\n", CPU->id, THREAD->tid, to); 78 78 79 79 rc = rwlock_write_lock_timeout(&rwlock, to); 80 80 if (SYNCH_FAILED(rc)) { 81 81 if (!sh_quiet) 82 printf("cpu% d, tid %lluw!\n", CPU->id, THREAD->tid);82 printf("cpu%u, tid %" PRIu64 " w!\n", CPU->id, THREAD->tid); 83 83 atomic_dec(&thread_count); 84 84 return; … … 86 86 87 87 if (!sh_quiet) 88 printf("cpu% d, tid %lluw=\n", CPU->id, THREAD->tid);88 printf("cpu%u, tid %" PRIu64 " w=\n", CPU->id, THREAD->tid); 89 89 90 90 if (rwlock.readers_in) { … … 107 107 108 108 if (!sh_quiet) 109 printf("cpu% d, tid %lluw-\n", CPU->id, THREAD->tid);109 printf("cpu%u, tid %" PRIu64 " w-\n", CPU->id, THREAD->tid); 110 110 atomic_dec(&thread_count); 111 111 } … … 120 120 121 121 if (!sh_quiet) 122 printf("cpu% d, tid %llur+ (%d)\n", CPU->id, THREAD->tid, to);122 printf("cpu%u, tid %" PRIu64 " r+ (%d)\n", CPU->id, THREAD->tid, to); 123 123 124 124 rc = rwlock_read_lock_timeout(&rwlock, to); 125 125 if (SYNCH_FAILED(rc)) { 126 126 if (!sh_quiet) 127 printf("cpu% d, tid %llur!\n", CPU->id, THREAD->tid);127 printf("cpu%u, tid %" PRIu64 " r!\n", CPU->id, THREAD->tid); 128 128 atomic_dec(&thread_count); 129 129 return; … … 131 131 132 132 if (!sh_quiet) 133 printf("cpu% d, tid %llur=\n", CPU->id, THREAD->tid);133 printf("cpu%u, tid %" PRIu64 " r=\n", CPU->id, THREAD->tid); 134 134 135 135 thread_usleep(30000); … … 137 137 138 138 if (!sh_quiet) 139 printf("cpu% d, tid %llur-\n", CPU->id, THREAD->tid);139 printf("cpu%u, tid %" PRIu64 " r-\n", CPU->id, THREAD->tid); 140 140 atomic_dec(&thread_count); 141 141 } … … 160 160 context_save(&ctx); 161 161 if (!quiet) { 162 printf("sp=%#x, readers_in=% d\n", ctx.sp, rwlock.readers_in);163 printf("Creating % dreaders\n", rd);162 printf("sp=%#x, readers_in=%" PRIc "\n", ctx.sp, rwlock.readers_in); 163 printf("Creating %" PRIu32 " readers\n", rd); 164 164 } 165 165 … … 169 169 thread_ready(thrd); 170 170 else if (!quiet) 171 printf("Could not create reader % d\n", i);171 printf("Could not create reader %" PRIu32 "\n", i); 172 172 } 173 173 174 174 if (!quiet) 175 printf("Creating % dwriters\n", wr);175 printf("Creating %" PRIu32 " writers\n", wr); 176 176 177 177 for (i = 0; i < wr; i++) { … … 180 180 thread_ready(thrd); 181 181 else if (!quiet) 182 printf("Could not create writer % d\n", i);182 printf("Could not create writer %" PRIu32 "\n", i); 183 183 } 184 184 … … 188 188 while (atomic_get(&thread_count) > 0) { 189 189 if (!quiet) 190 printf("Threads left: % d\n", atomic_get(&thread_count));190 printf("Threads left: %ld\n", atomic_get(&thread_count)); 191 191 thread_sleep(1); 192 192 }
Note:
See TracChangeset
for help on using the changeset viewer.