summaryrefslogtreecommitdiff
path: root/core/host/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/host/task.c')
-rw-r--r--core/host/task.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/core/host/task.c b/core/host/task.c
index f8f8dfb661..3ba241198b 100644
--- a/core/host/task.c
+++ b/core/host/task.c
@@ -1,4 +1,4 @@
-/* Copyright 2013 The Chromium OS Authors. All rights reserved.
+/* Copyright 2013 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -96,22 +96,18 @@ void _run_test(void *d)
run_test(0, NULL);
}
-#define TASK(n, r, d, s) {r, d},
+#define TASK(n, r, d, s) { r, d },
const struct task_args task_info[TASK_ID_COUNT] = {
- {__idle, NULL},
- CONFIG_TASK_LIST
- CONFIG_TEST_TASK_LIST
- CONFIG_CTS_TASK_LIST
- {_run_test, NULL},
+ { __idle, NULL },
+ CONFIG_TASK_LIST CONFIG_TEST_TASK_LIST CONFIG_CTS_TASK_LIST{ _run_test,
+ NULL },
};
#undef TASK
#define TASK(n, r, d, s) #n,
-static const char * const task_names[] = {
+static const char *const task_names[] = {
"<< idle >>",
- CONFIG_TASK_LIST
- CONFIG_TEST_TASK_LIST
- CONFIG_CTS_TASK_LIST
+ CONFIG_TASK_LIST CONFIG_TEST_TASK_LIST CONFIG_CTS_TASK_LIST
"<< test runner >>",
};
#undef TASK
@@ -319,14 +315,13 @@ void task_print_list(void)
}
}
-static int command_task_info(int argc, char **argv)
+static int command_task_info(int argc, const char **argv)
{
task_print_list();
return EC_SUCCESS;
}
-DECLARE_SAFE_CONSOLE_COMMAND(taskinfo, command_task_info,
- NULL,
+DECLARE_SAFE_CONSOLE_COMMAND(taskinfo, command_task_info, NULL,
"Print task info");
static void _wait_for_task_started(int can_sleep)
@@ -519,8 +514,8 @@ int task_start(void)
*/
pthread_mutex_lock(&interrupt_lock);
- pthread_create(&interrupt_thread, NULL,
- _task_int_generator_start, NULL);
+ pthread_create(&interrupt_thread, NULL, _task_int_generator_start,
+ NULL);
/*
* Tell the hooks task to continue so that it can call back to enable
@@ -557,7 +552,6 @@ static void task_enable_all_tasks_callback(void)
pthread_mutex_unlock(&interrupt_lock);
pthread_cond_wait(&scheduler_cond, &run_lock);
}
-
}
void task_enable_all_tasks(void)