summaryrefslogtreecommitdiff
path: root/kern/thread.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2013-03-11 20:16:26 +0100
committerRichard Braun <rbraun@sceen.net>2013-03-11 20:16:26 +0100
commit7f4202118e6ff217ad159420224663ce146a498d (patch)
treea3521a95b29c552c3b024b0fb64184f1c75511ff /kern/thread.c
parentc41eee45972dcbeac7a327b9531b7e5ea3757538 (diff)
kern/thread: minor change about kernel thread naming
Diffstat (limited to 'kern/thread.c')
-rw-r--r--kern/thread.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/kern/thread.c b/kern/thread.c
index ce52e850..c1d91eb8 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -15,7 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
- * By convention, kernel threads are named after their start function.
+ * By convention, the name of a kernel thread is built by prefixing the
+ * kernel name and adding the name of the start function, without the module
+ * name ("thread"). Threads that are bound to a processor also include the
+ * "/cpu_id" suffix. For example, "x15_balancer/1" is the name of the
+ * inter-processor balancing thread of the second processor.
*/
#include <kern/assert.h>
@@ -1343,7 +1347,7 @@ thread_setup_balancer(void)
*
* TODO CPU affinity
*/
- snprintf(name, sizeof(name), "thread_balancer/%u", cpu_id());
+ snprintf(name, sizeof(name), "x15_balancer/%u", cpu_id());
attr.task = kernel_task;
attr.name = name;
attr.sched_policy = THREAD_SCHED_CLASS_RT;
@@ -1387,7 +1391,7 @@ thread_setup_idler(void)
cpu_intr_disable();
cpu = cpu_id();
- snprintf(name, sizeof(name), "thread_idler/%u", cpu);
+ snprintf(name, sizeof(name), "x15_idler/%u", cpu);
attr.task = kernel_task;
attr.name = name;
attr.sched_policy = THREAD_SCHED_POLICY_IDLE;