summaryrefslogtreecommitdiff
path: root/kern/task.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2016-12-09 01:41:06 +0100
committerRichard Braun <rbraun@sceen.net>2016-12-09 01:41:06 +0100
commit39c13b3b84b34e0938220126c8f147d2b0b6ac89 (patch)
tree92accef33f04f49a01765e00ec026b092ae0c8ca /kern/task.c
parent84c92cd2be8bc4aea6c14a186f79c2277f0fd4aa (diff)
Force brackets around one-line conditional statements
This change was done using astyle, with a few manual editing here and there.
Diffstat (limited to 'kern/task.c')
-rw-r--r--kern/task.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/kern/task.c b/kern/task.c
index ede1683..47efeec 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -80,8 +80,9 @@ task_create(struct task **taskp, const char *name)
error = vm_map_create(&map);
- if (error)
+ if (error) {
goto error_map;
+ }
task_init(task, name, map);
@@ -122,8 +123,9 @@ task_info(struct task *task)
if (task == NULL) {
spinlock_lock(&task_list_lock);
- list_for_each_entry(&task_list, task, node)
+ list_for_each_entry(&task_list, task, node) {
printk("task: %s\n", task->name);
+ }
spinlock_unlock(&task_list_lock);
@@ -134,10 +136,11 @@ task_info(struct task *task)
printk("task: name: %s, threads:\n", task->name);
- list_for_each_entry(&task->threads, thread, task_node)
+ list_for_each_entry(&task->threads, thread, task_node) {
printk("task: %s: %p %c %.2s:%02u %s\n", task->name, thread,
thread_state_to_chr(thread), thread_schedclass_to_str(thread),
thread_schedprio(thread), thread->name);
+ }
spinlock_unlock(&task->lock);
}