diff options
author | Richard Braun <rbraun@sceen.net> | 2017-04-29 21:52:54 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-04-29 21:52:54 +0200 |
commit | d78a948f0a1d8b7b3385944c736d7cffd8ca67a7 (patch) | |
tree | 73f5b4b37b73311d768670f1838688dd4505d47a /test | |
parent | 6ba94ce79c8477758dd440d3563ffd4dd88883df (diff) |
kern/printk: rename to printf
The printk functions are close enough to the printf ones to bear the
same names.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_llsync_defer.c | 8 | ||||
-rw-r--r-- | test/test_mutex_pi.c | 8 | ||||
-rw-r--r-- | test/test_pmap_update_mp.c | 14 | ||||
-rw-r--r-- | test/test_sref_dirty_zeroes.c | 2 | ||||
-rw-r--r-- | test/test_sref_noref.c | 16 | ||||
-rw-r--r-- | test/test_sref_weakref.c | 4 | ||||
-rw-r--r-- | test/test_vm_page_fill.c | 2 | ||||
-rw-r--r-- | test/test_xcall.c | 8 |
8 files changed, 31 insertions, 31 deletions
diff --git a/test/test_llsync_defer.c b/test/test_llsync_defer.c index 929ece64..9bce0162 100644 --- a/test/test_llsync_defer.c +++ b/test/test_llsync_defer.c @@ -39,7 +39,7 @@ #include <kern/mutex.h> #include <kern/panic.h> #include <kern/param.h> -#include <kern/printk.h> +#include <kern/printf.h> #include <kern/thread.h> #include <kern/work.h> #include <test/test.h> @@ -91,7 +91,7 @@ test_alloc(void *arg) condition_signal(&test_condition); if ((i % TEST_LOOPS_PER_PRINT) == 0) { - printk("alloc "); + printf("alloc "); } i++; @@ -140,7 +140,7 @@ test_free(void *arg) condition_signal(&test_condition); if ((i % TEST_LOOPS_PER_PRINT) == 0) { - printk("free "); + printf("free "); } i++; @@ -173,7 +173,7 @@ test_read(void *arg) } if ((i % TEST_LOOPS_PER_PRINT) == 0) { - printk("read "); + printf("read "); } i++; diff --git a/test/test_mutex_pi.c b/test/test_mutex_pi.c index ca03b32b..8f864756 100644 --- a/test/test_mutex_pi.c +++ b/test/test_mutex_pi.c @@ -84,7 +84,7 @@ #include <kern/error.h> #include <kern/mutex.h> #include <kern/panic.h> -#include <kern/printk.h> +#include <kern/printf.h> #include <kern/syscnt.h> #include <kern/thread.h> #include <kern/turnstile.h> @@ -181,7 +181,7 @@ test_for_priority_boosted(unsigned short *highest_priority) } if (real_priority > *highest_priority) { - printk("%c: real priority boosted to %s\n", + printf("%c: real priority boosted to %s\n", test_get_name(), test_thread_from_priority(real_priority)); *highest_priority = real_priority; } @@ -215,7 +215,7 @@ test_for_priority_deboosted(void) static void test_report_progress(unsigned int i) { - printk("%c:%u ", test_get_name(), i); + printf("%c:%u ", test_get_name(), i); } static void @@ -304,7 +304,7 @@ test_manage_b(void *arg) test_consume_cpu(); } - printk("b:%u ", i); + printf("b:%u ", i); syscnt_info("thread_boosts"); } } diff --git a/test/test_pmap_update_mp.c b/test/test_pmap_update_mp.c index 5f40c8ce..0c5e2dbd 100644 --- a/test/test_pmap_update_mp.c +++ b/test/test_pmap_update_mp.c @@ -33,7 +33,7 @@ #include <kern/mutex.h> #include <kern/panic.h> #include <kern/param.h> -#include <kern/printk.h> +#include <kern/printf.h> #include <kern/thread.h> #include <test/test.h> #include <vm/vm_kmem.h> @@ -49,12 +49,12 @@ test_run1(void *arg) (void)arg; - printk("allocating page\n"); + printf("allocating page\n"); ptr = vm_kmem_alloc(PAGE_SIZE); - printk("writing page\n"); + printf("writing page\n"); memset(ptr, 'a', PAGE_SIZE); - printk("passing page to second thread (%p)\n", ptr); + printf("passing page to second thread (%p)\n", ptr); mutex_lock(&test_lock); test_va = ptr; @@ -70,7 +70,7 @@ test_run2(void *arg) (void)arg; - printk("waiting for page\n"); + printf("waiting for page\n"); mutex_lock(&test_lock); @@ -82,7 +82,7 @@ test_run2(void *arg) mutex_unlock(&test_lock); - printk("page received (%p), checking page\n", ptr); + printf("page received (%p), checking page\n", ptr); for (i = 0; i < PAGE_SIZE; i++) { if (ptr[i] != 'a') { @@ -91,7 +91,7 @@ test_run2(void *arg) } vm_kmem_free(ptr, PAGE_SIZE); - printk("done\n"); + printf("done\n"); } void diff --git a/test/test_sref_dirty_zeroes.c b/test/test_sref_dirty_zeroes.c index 2b844d47..40997601 100644 --- a/test/test_sref_dirty_zeroes.c +++ b/test/test_sref_dirty_zeroes.c @@ -67,7 +67,7 @@ test_inc(void *arg) mutex_unlock(&test_lock); } - printk("counter global value: %lu\n", test_counter.value); + printf("counter global value: %lu\n", test_counter.value); syscnt_info("sref_epoch"); syscnt_info("sref_dirty_zero"); syscnt_info("sref_true_zero"); diff --git a/test/test_sref_noref.c b/test/test_sref_noref.c index d7dbc3d0..b98edd38 100644 --- a/test/test_sref_noref.c +++ b/test/test_sref_noref.c @@ -76,7 +76,7 @@ test_ref(void *arg) mutex_lock(&test_lock); - printk("waiting for page\n"); + printf("waiting for page\n"); while (test_obj == NULL) { condition_wait(&test_condition, &test_lock); @@ -86,13 +86,13 @@ test_ref(void *arg) mutex_unlock(&test_lock); - printk("page received, manipulate reference counter\n"); + printf("page received, manipulate reference counter\n"); while (!test_stop) { test_manipulate_counter(obj); } - printk("thread exiting\n"); + printf("thread exiting\n"); } static void @@ -102,7 +102,7 @@ test_obj_noref(struct sref_counter *counter) obj = structof(counter, struct test_obj, ref_counter); vm_kmem_free(obj, sizeof(*obj)); - printk("0 references, page released\n"); + printf("0 references, page released\n"); syscnt_info("sref_epoch"); syscnt_info("sref_dirty_zero"); syscnt_info("sref_true_zero"); @@ -135,7 +135,7 @@ test_run(void *arg) error_check(error, "thread_create"); } - printk("allocating page\n"); + printf("allocating page\n"); obj = vm_kmem_alloc(sizeof(*obj)); if (obj == NULL) { @@ -144,7 +144,7 @@ test_run(void *arg) sref_counter_init(&obj->ref_counter, NULL, test_obj_noref); - printk("page allocated, 1 reference, publishing\n"); + printf("page allocated, 1 reference, publishing\n"); mutex_lock(&test_lock); test_obj = obj; @@ -155,14 +155,14 @@ test_run(void *arg) test_manipulate_counter(obj); } - printk("stopping test, wait for threads\n"); + printf("stopping test, wait for threads\n"); test_stop = 1; for (i = 0; i < nr_threads; i++) { thread_join(threads[i]); } - printk("releasing initial reference\n"); + printf("releasing initial reference\n"); sref_counter_dec(&obj->ref_counter); kmem_free(threads, sizeof(*threads) * nr_threads); diff --git a/test/test_sref_weakref.c b/test/test_sref_weakref.c index e28851f7..65918a1f 100644 --- a/test/test_sref_weakref.c +++ b/test/test_sref_weakref.c @@ -71,7 +71,7 @@ test_run(void *arg) for (j = 0; j < 0x20000000; j++); - printk("run: iterations: %lu\n", i); + printf("run: iterations: %lu\n", i); syscnt_info("sref_epoch"); syscnt_info("sref_dirty_zero"); syscnt_info("sref_revive"); @@ -95,7 +95,7 @@ test_ref(void *arg) } if ((i % 100000000) == 0) { - printk("ref: iterations: %lu\n", i); + printf("ref: iterations: %lu\n", i); } } } diff --git a/test/test_vm_page_fill.c b/test/test_vm_page_fill.c index c334407d..71711995 100644 --- a/test/test_vm_page_fill.c +++ b/test/test_vm_page_fill.c @@ -115,7 +115,7 @@ test_run(void *arg) (void)arg; for (i = 0; /* no condition */; i++) { - printk("test: pass:%u pattern:%hhx\n", i, test_pattern); + printf("test: pass:%u pattern:%hhx\n", i, test_pattern); test_write_pages(); test_reset_pages(); test_pattern++; diff --git a/test/test_xcall.c b/test/test_xcall.c index ab4fa113..3552944a 100644 --- a/test/test_xcall.c +++ b/test/test_xcall.c @@ -25,7 +25,7 @@ #include <kern/error.h> #include <kern/cpumap.h> #include <kern/panic.h> -#include <kern/printk.h> +#include <kern/printf.h> #include <kern/thread.h> #include <kern/xcall.h> #include <test/test.h> @@ -37,7 +37,7 @@ test_fn(void *arg) { (void)arg; - printk("function called, running on cpu%u\n", cpu_id()); + printf("function called, running on cpu%u\n", cpu_id()); test_done = 1; } @@ -46,7 +46,7 @@ test_once(unsigned int cpu) { test_done = 0; - printk("cross-call on cpu%u:\n", cpu); + printf("cross-call on cpu%u:\n", cpu); xcall_call(test_fn, NULL, cpu); if (!test_done) { @@ -61,7 +61,7 @@ test_run(void *arg) test_once(0); test_once(1); - printk("done\n"); + printf("done\n"); } void |