summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kern/work.c1
-rw-r--r--test/test_llsync_defer.c3
-rw-r--r--test/test_pmap_update_mp.c2
-rw-r--r--test/test_x86_pmap_remove_ptp.c1
4 files changed, 7 insertions, 0 deletions
diff --git a/kern/work.c b/kern/work.c
index cc6f1dd6..2865d616 100644
--- a/kern/work.c
+++ b/kern/work.c
@@ -411,6 +411,7 @@ work_thread_create(struct work_pool *pool, unsigned int id)
}
thread_attr_init(&attr, name);
+ thread_attr_set_detached(&attr);
thread_attr_set_priority(&attr, priority);
if (cpumap != NULL)
diff --git a/test/test_llsync_defer.c b/test/test_llsync_defer.c
index 927e9eed..2286cb57 100644
--- a/test/test_llsync_defer.c
+++ b/test/test_llsync_defer.c
@@ -187,14 +187,17 @@ test_setup(void)
0, NULL, NULL, NULL, 0);
thread_attr_init(&attr, "x15_test_alloc");
+ thread_attr_set_detached(&attr);
error = thread_create(&thread, &attr, test_alloc, NULL);
assert(!error);
thread_attr_init(&attr,"x15_test_free");
+ thread_attr_set_detached(&attr);
error = thread_create(&thread, &attr, test_free, NULL);
assert(!error);
thread_attr_init(&attr, "x15_test_read");
+ thread_attr_set_detached(&attr);
error = thread_create(&thread, &attr, test_read, NULL);
assert(!error);
}
diff --git a/test/test_pmap_update_mp.c b/test/test_pmap_update_mp.c
index 2386fda0..bfaaac6f 100644
--- a/test/test_pmap_update_mp.c
+++ b/test/test_pmap_update_mp.c
@@ -108,6 +108,7 @@ test_setup(void)
cpumap_zero(cpumap);
cpumap_set(cpumap, 0);
thread_attr_init(&attr, "x15_test_run1");
+ thread_attr_set_detached(&attr);
thread_attr_set_cpumap(&attr, cpumap);
error = thread_create(&thread, &attr, test_run1, NULL);
assert(!error);
@@ -115,6 +116,7 @@ test_setup(void)
cpumap_zero(cpumap);
cpumap_set(cpumap, 1);
thread_attr_init(&attr, "x15_test_run2");
+ thread_attr_set_detached(&attr);
thread_attr_set_cpumap(&attr, cpumap);
error = thread_create(&thread, &attr, test_run2, NULL);
assert(!error);
diff --git a/test/test_x86_pmap_remove_ptp.c b/test/test_x86_pmap_remove_ptp.c
index 72970da0..601248d3 100644
--- a/test/test_x86_pmap_remove_ptp.c
+++ b/test/test_x86_pmap_remove_ptp.c
@@ -112,6 +112,7 @@ test_setup(void)
cpumap_zero(cpumap);
cpumap_set(cpumap, 0);
thread_attr_init(&attr, "x15_test_run");
+ thread_attr_set_detached(&attr);
thread_attr_set_cpumap(&attr, cpumap);
thread_attr_set_policy(&attr, THREAD_SCHED_POLICY_FIFO);
thread_attr_set_priority(&attr, THREAD_SCHED_RT_PRIO_MAX);