diff --git a/include/sched.h b/include/sched.h index 0c4443e93d..c12bf99d54 100644 --- a/include/sched.h +++ b/include/sched.h @@ -1,7 +1,7 @@ /******************************************************************************** * include/sched.h * - * Copyright (C) 2007-2009, 2011, 2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011, 2013, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -227,7 +227,9 @@ int task_create(FAR const char *name, int priority, int stack_size, main_t entry, FAR char * const argv[]); #endif int task_delete(pid_t pid); +#ifndef CONFIG_SMP /* Not yet supported for the SMP case */ int task_restart(pid_t pid); +#endif /* Task Scheduling Interfaces (based on POSIX APIs) */ diff --git a/sched/task/Make.defs b/sched/task/Make.defs index 32c21f3324..a9a85971e6 100644 --- a/sched/task/Make.defs +++ b/sched/task/Make.defs @@ -35,9 +35,12 @@ CSRCS += task_create.c task_init.c task_setup.c task_activate.c CSRCS += task_start.c task_delete.c task_exit.c task_exithook.c -CSRCS += task_recover.c task_restart.c task_spawnparms.c -CSRCS += task_terminate.c task_getgroup.c task_prctl.c task_getpid.c -CSRCS += exit.c +CSRCS += task_recover.c task_spawnparms.c task_terminate.c +CSRCS += task_getgroup.c task_prctl.c task_getpid.c exit.c + +ifneq ($(CONFIG_SMP),y) +CSRCS += task_restart.c +endif ifeq ($(CONFIG_ARCH_HAVE_VFORK),y) ifeq ($(CONFIG_SCHED_WAITPID),y) diff --git a/sched/task/task_restart.c b/sched/task/task_restart.c index 70da24df57..9ca6d4e88d 100644 --- a/sched/task/task_restart.c +++ b/sched/task/task_restart.c @@ -51,6 +51,8 @@ #include "signal/signal.h" #include "task/task.h" +#ifndef CONFIG_SMP /* Not yet supported for the SMP case */ + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -209,3 +211,5 @@ errout_with_lock: sched_unlock(); return ERROR; } + +#endif /* CONFIG_SMP */