summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 14:43:42 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-29 07:04:53 +0000
commit8f58c9fdbd25dfeee1383d333f94c5d638ce5e96 (patch)
treeedb017eedcaafdc845bb038153f841830a4e99d6
parentd67a121d70b86be218841a8a268eeff3b3210a00 (diff)
downloadchrome-ec-8f58c9fdbd25dfeee1383d333f94c5d638ce5e96.tar.gz
core/host/task.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: I23fe8333715fa67e5d6888fb1a2e979f329d946d Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729844 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--core/host/task.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/core/host/task.c b/core/host/task.c
index f8f8dfb661..4af894d6c3 100644
--- a/core/host/task.c
+++ b/core/host/task.c
@@ -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
@@ -325,8 +321,7 @@ static int command_task_info(int argc, char **argv)
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)