summaryrefslogtreecommitdiff
path: root/kern/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/thread.c')
-rw-r--r--kern/thread.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/kern/thread.c b/kern/thread.c
index a5d63b9..77960ec 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -617,9 +617,10 @@ thread_runq_schedule_load(struct thread *thread)
static void
thread_runq_schedule_unload(struct thread *thread)
{
- (void)thread;
#ifdef CONFIG_PERFMON
perfmon_thread_unload(thread);
+#else
+ (void)thread;
#endif
}
@@ -1868,7 +1869,7 @@ thread_init(struct thread *thread, void *stack,
if (error) {
goto error_perfmon;
}
-#endif
+#endif /* CONFIG_PERFMON */
error = tcb_build(&thread->tcb, stack, fn, arg);
@@ -1884,7 +1885,7 @@ error_tcb:
#ifdef CONFIG_PERFMON
perfmon_thread_destroy(thread);
error_perfmon:
-#endif
+#endif /* CONFIG_PERFMON */
thread_destroy_tsd(thread);
turnstile_destroy(thread->priv_turnstile);
error_turnstile:
@@ -2341,7 +2342,7 @@ thread_setup(void)
#ifdef CONFIG_PERFMON
#define THREAD_PERFMON_INIT_OP_DEPS \
- INIT_OP_DEP(perfmon_bootstrap, true),
+ INIT_OP_DEP(perfmon_bootstrap, true),
#else /* CONFIG_PERFMON */
#define THREAD_PERFMON_INIT_OP_DEPS
#endif /* CONFIG_PERFMON */
@@ -2734,10 +2735,10 @@ thread_report_periodic_event(void)
spinlock_unlock(&runq->lock);
}
-unsigned int thread_cpu(const struct thread *thread)
+unsigned int
+thread_cpu(const struct thread *thread)
{
- assert (thread->runq != NULL);
-
+ assert(thread->runq);
return thread->runq->cpu;
}