diff options
-rw-r--r-- | arch/x86/machine/pmap.c | 2 | ||||
-rw-r--r-- | kern/sref.c | 2 | ||||
-rw-r--r-- | kern/thread.c | 7 | ||||
-rw-r--r-- | kern/thread.h | 2 | ||||
-rw-r--r-- | kern/work.c | 6 | ||||
-rw-r--r-- | test/test_llsync_defer.c | 6 | ||||
-rw-r--r-- | test/test_pmap_update_mp.c | 4 | ||||
-rw-r--r-- | test/test_sref_dirty_zeroes.c | 4 | ||||
-rw-r--r-- | test/test_sref_noref.c | 4 | ||||
-rw-r--r-- | test/test_vm_page_fill.c | 2 | ||||
-rw-r--r-- | test/test_xcall.c | 2 |
11 files changed, 23 insertions, 18 deletions
diff --git a/arch/x86/machine/pmap.c b/arch/x86/machine/pmap.c index 273b89c..bcbaec5 100644 --- a/arch/x86/machine/pmap.c +++ b/arch/x86/machine/pmap.c @@ -1038,7 +1038,7 @@ pmap_mp_setup(void) for (cpu = 0; cpu < cpu_count(); cpu++) { syncer = percpu_ptr(pmap_syncer, cpu); - snprintf(name, sizeof(name), "x15_pmap_sync/%u", cpu); + snprintf(name, sizeof(name), THREAD_KERNEL_PREFIX "pmap_sync/%u", cpu); cpumap_zero(cpumap); cpumap_set(cpumap, cpu); thread_attr_init(&attr, name); diff --git a/kern/sref.c b/kern/sref.c index a9253dc..d8bb254 100644 --- a/kern/sref.c +++ b/kern/sref.c @@ -737,7 +737,7 @@ sref_setup_manager(struct sref_cache *cache, unsigned int cpu) cpumap_zero(cpumap); cpumap_set(cpumap, cpu); - snprintf(name, sizeof(name), "x15_sref_manage/%u", cpu); + snprintf(name, sizeof(name), THREAD_KERNEL_PREFIX "sref_manage/%u", cpu); thread_attr_init(&attr, name); thread_attr_set_cpumap(&attr, cpumap); thread_attr_set_policy(&attr, THREAD_SCHED_POLICY_FIFO); diff --git a/kern/thread.c b/kern/thread.c index 09159f6..b66136c 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -1711,7 +1711,7 @@ thread_setup_reaper(void) condition_init(&thread_reap_cond); list_init(&thread_reap_list); - thread_attr_init(&attr, "x15_thread_reap"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "thread_reap"); error = thread_create(&thread, &attr, thread_reap, NULL); if (error) { @@ -1785,7 +1785,7 @@ thread_setup_balancer(struct thread_runq *runq) cpumap_zero(cpumap); cpumap_set(cpumap, thread_runq_cpu(runq)); - snprintf(name, sizeof(name), "x15_thread_balance/%u", + snprintf(name, sizeof(name), THREAD_KERNEL_PREFIX "thread_balance/%u", thread_runq_cpu(runq)); thread_attr_init(&attr, name); thread_attr_set_cpumap(&attr, cpumap); @@ -1871,7 +1871,8 @@ thread_setup_idler(struct thread_runq *runq) panic("thread: unable to allocate idler thread stack"); } - snprintf(name, sizeof(name), "x15_thread_idle/%u", thread_runq_cpu(runq)); + snprintf(name, sizeof(name), THREAD_KERNEL_PREFIX "thread_idle/%u", + thread_runq_cpu(runq)); thread_attr_init(&attr, name); thread_attr_set_cpumap(&attr, cpumap); thread_attr_set_policy(&attr, THREAD_SCHED_POLICY_IDLE); diff --git a/kern/thread.h b/kern/thread.h index 6279df5..c9df15b 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -52,6 +52,8 @@ struct thread; #include <kern/thread_i.h> +#define THREAD_KERNEL_PREFIX PACKAGE "_" + /* * Scheduling policies. * diff --git a/kern/work.c b/kern/work.c index f3d0848..59034ac 100644 --- a/kern/work.c +++ b/kern/work.c @@ -419,7 +419,8 @@ work_thread_create(struct work_pool *pool, unsigned int id) if (pool->flags & WORK_PF_GLOBAL) { cpumap = NULL; - snprintf(name, sizeof(name), "x15_work_process/g:%u%s", + snprintf(name, sizeof(name), + THREAD_KERNEL_PREFIX "work_process/g:%u%s", worker->id, suffix); } else { unsigned int pool_id; @@ -433,7 +434,8 @@ work_thread_create(struct work_pool *pool, unsigned int id) pool_id = work_pool_cpu_id(pool); cpumap_zero(cpumap); cpumap_set(cpumap, pool_id); - snprintf(name, sizeof(name), "x15_work_process/%u:%u%s", + snprintf(name, sizeof(name), + THREAD_KERNEL_PREFIX "work_process/%u:%u%s", pool_id, worker->id, suffix); } diff --git a/test/test_llsync_defer.c b/test/test_llsync_defer.c index 0cbe68d..e4cca21 100644 --- a/test/test_llsync_defer.c +++ b/test/test_llsync_defer.c @@ -194,17 +194,17 @@ test_setup(void) kmem_cache_init(&test_pdsc_cache, "test_pdsc", sizeof(struct test_pdsc), 0, NULL, 0); - thread_attr_init(&attr, "x15_test_alloc"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "test_alloc"); thread_attr_set_detached(&attr); error = thread_create(&thread, &attr, test_alloc, NULL); error_check(error, "thread_create"); - thread_attr_init(&attr,"x15_test_free"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "test_free"); thread_attr_set_detached(&attr); error = thread_create(&thread, &attr, test_free, NULL); error_check(error, "thread_create"); - thread_attr_init(&attr, "x15_test_read"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "test_read"); thread_attr_set_detached(&attr); error = thread_create(&thread, &attr, test_read, NULL); error_check(error, "thread_create"); diff --git a/test/test_pmap_update_mp.c b/test/test_pmap_update_mp.c index df20dd1..21882bf 100644 --- a/test/test_pmap_update_mp.c +++ b/test/test_pmap_update_mp.c @@ -110,7 +110,7 @@ test_setup(void) cpumap_zero(cpumap); cpumap_set(cpumap, 0); - thread_attr_init(&attr, "x15_test_run1"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "test_run1"); thread_attr_set_detached(&attr); thread_attr_set_cpumap(&attr, cpumap); error = thread_create(&thread, &attr, test_run1, NULL); @@ -118,7 +118,7 @@ test_setup(void) cpumap_zero(cpumap); cpumap_set(cpumap, 1); - thread_attr_init(&attr, "x15_test_run2"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "test_run2"); thread_attr_set_detached(&attr); thread_attr_set_cpumap(&attr, cpumap); error = thread_create(&thread, &attr, test_run2, NULL); diff --git a/test/test_sref_dirty_zeroes.c b/test/test_sref_dirty_zeroes.c index e82d35d..6080219 100644 --- a/test/test_sref_dirty_zeroes.c +++ b/test/test_sref_dirty_zeroes.c @@ -113,12 +113,12 @@ test_setup(void) sref_counter_init(&test_counter, test_noref); test_transient_ref = 0; - thread_attr_init(&attr, "x15_test_inc"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "test_inc"); thread_attr_set_detached(&attr); error = thread_create(&thread, &attr, test_inc, NULL); error_check(error, "thread_create"); - thread_attr_init(&attr, "x15_test_dec"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "test_dec"); thread_attr_set_detached(&attr); error = thread_create(&thread, &attr, test_dec, NULL); error_check(error, "thread_create"); diff --git a/test/test_sref_noref.c b/test/test_sref_noref.c index 2bcd462..0895de4 100644 --- a/test/test_sref_noref.c +++ b/test/test_sref_noref.c @@ -128,7 +128,7 @@ test_run(void *arg) } for (i = 0; i < nr_threads; i++) { - snprintf(name, sizeof(name), "x15_test_ref/%u", i); + snprintf(name, sizeof(name), THREAD_KERNEL_PREFIX "test_ref/%u", i); thread_attr_init(&attr, name); error = thread_create(&threads[i], &attr, test_ref, NULL); error_check(error, "thread_create"); @@ -177,7 +177,7 @@ test_setup(void) condition_init(&test_condition); mutex_init(&test_lock); - thread_attr_init(&attr, "x15_test_run"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "test_run"); thread_attr_set_detached(&attr); error = thread_create(&thread, &attr, test_run, NULL); error_check(error, "thread_create"); diff --git a/test/test_vm_page_fill.c b/test/test_vm_page_fill.c index d20fd8a..55a328b 100644 --- a/test/test_vm_page_fill.c +++ b/test/test_vm_page_fill.c @@ -132,7 +132,7 @@ test_setup(void) cpumap_zero(&test_cpumap); cpumap_set(&test_cpumap, cpu_id()); - thread_attr_init(&attr, "x15_test_run"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "test_run"); thread_attr_set_detached(&attr); thread_attr_set_cpumap(&attr, &test_cpumap); error = thread_create(&thread, &attr, test_run, NULL); diff --git a/test/test_xcall.c b/test/test_xcall.c index 262196d..2d496de 100644 --- a/test/test_xcall.c +++ b/test/test_xcall.c @@ -76,7 +76,7 @@ test_setup(void) cpumap_zero(cpumap); cpumap_set(cpumap, 0); - thread_attr_init(&attr, "x15_test_run"); + thread_attr_init(&attr, THREAD_KERNEL_PREFIX "test_run"); thread_attr_set_detached(&attr); thread_attr_set_cpumap(&attr, cpumap); error = thread_create(&thread, &attr, test_run, NULL); |