From a884818e32687b2b199a43daaec022112ed4cda9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 12 Feb 2016 17:12:01 -0600 Subject: [PATCH] SIM: Add empty stubs for SMP function up_cpustop and up_cpustart --- arch/sim/src/up_simsmp.c | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/sim/src/up_simsmp.c b/arch/sim/src/up_simsmp.c index c54144678d5..306cab05efe 100644 --- a/arch/sim/src/up_simsmp.c +++ b/arch/sim/src/up_simsmp.c @@ -251,3 +251,52 @@ errout_with_mutex: (void)pthread_mutex_destroy(&cpuinfo.mutex); return ret; } + +/**************************************************************************** + * Name: up_cpustop + * + * Description: + * Save the state of the current task at the head of the + * g_assignedtasks[cpu] task list and then stop the CPU. + * + * This function is called by the OS when the logic executing on one CPU + * needs to modify the state of the g_assignedtasks[cpu] list for another + * CPU. + * + * Input Parameters: + * cpu - The index of the CPU to be stopped/ + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int up_cpustop(int cpu) +{ +#warning Missing SMP logic + return 0; +} + +/**************************************************************************** + * Name: up_cpurestart + * + * Description: + * Restart the cpu, restoring the state of the task at the head of the + * g_assignedtasks[cpu] list. + * + * This function is called after up_cpustop in order resume operation of + * the CPU after modifying its g_assignedtasks[cpu] list. + * + * Input Parameters: + * cpu - The index of the CPU being re-started. + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int up_cpurestart(int cpu) +{ +#warning Missing SMP logic + return 0; +}