diff options
author | Richard Braun <rbraun@sceen.net> | 2014-06-18 23:35:45 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2014-06-18 23:35:45 +0200 |
commit | 82dc13cf6a4b760e02729d25d6f2abb35f7d4e7c (patch) | |
tree | 0ca17e9d8cab1c6630ca532751a398c5a4172d08 | |
parent | 701a5d9cf5a9416eb8303d703049bf1d4c6c69f0 (diff) |
Set threads as detached where applicable
-rw-r--r-- | kern/work.c | 1 | ||||
-rw-r--r-- | test/test_llsync_defer.c | 3 | ||||
-rw-r--r-- | test/test_pmap_update_mp.c | 2 | ||||
-rw-r--r-- | test/test_x86_pmap_remove_ptp.c | 1 |
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); |