From 47bea0e67e4093d4482e8781782b98abda134801 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 6 Sep 2014 09:19:15 -0600 Subject: With kernel build, entry point to all tasks is main, not some xyz_main --- apps/examples/ostest/ostest_main.c | 8 ++++++++ apps/examples/ostest/restart.c | 4 ++++ apps/examples/ostest/sighand.c | 4 ++++ apps/examples/ostest/waitpid.c | 4 ++++ 4 files changed, 20 insertions(+) (limited to 'apps/examples/ostest') diff --git a/apps/examples/ostest/ostest_main.c b/apps/examples/ostest/ostest_main.c index 8e78e5d2d..c923c23fe 100644 --- a/apps/examples/ostest/ostest_main.c +++ b/apps/examples/ostest/ostest_main.c @@ -223,7 +223,11 @@ static void show_environment(bool var1_valid, bool var2_valid, bool var3_valid) * Name: user_main ****************************************************************************/ +#ifdef CONFIG_BUILD_KERNEL +int main(int argc, FAR char **argv) +#else static int user_main(int argc, char *argv[]) +#endif { int i; @@ -506,10 +510,14 @@ static void stdio_test(void) * Public Functions ****************************************************************************/ +#ifdef CONFIG_BUILD_KERNEL /**************************************************************************** +int main(int argc, FAR char **argv) * ostest_main +#else ****************************************************************************/ +#endif int ostest_main(int argc, FAR char *argv[]) { int result; diff --git a/apps/examples/ostest/restart.c b/apps/examples/ostest/restart.c index 703dbd90e..7cbdd25d3 100644 --- a/apps/examples/ostest/restart.c +++ b/apps/examples/ostest/restart.c @@ -76,7 +76,11 @@ static bool g_restarted; * Private Functions ****************************************************************************/ +#ifdef CONFIG_BUILD_KERNEL +int main(int argc, FAR char **argv) +#else static int restart_main(int argc, char *argv[]) +#endif { #ifndef CONFIG_DISABLE_ENVIRON char *actual; diff --git a/apps/examples/ostest/sighand.c b/apps/examples/ostest/sighand.c index ea9775e01..82c87b120 100644 --- a/apps/examples/ostest/sighand.c +++ b/apps/examples/ostest/sighand.c @@ -137,7 +137,11 @@ static void wakeup_action(int signo, siginfo_t *info, void *ucontext) } } +#ifdef CONFIG_BUILD_KERNEL +int main(int argc, FAR char **argv) +#else static int waiter_main(int argc, char *argv[]) +#endif { sigset_t sigset; struct sigaction act; diff --git a/apps/examples/ostest/waitpid.c b/apps/examples/ostest/waitpid.c index 6b6de7908..f31a25543 100644 --- a/apps/examples/ostest/waitpid.c +++ b/apps/examples/ostest/waitpid.c @@ -67,7 +67,11 @@ static int g_waitpids[NCHILDREN]; * Priviate Functions ****************************************************************************/ +#ifdef CONFIG_BUILD_KERNEL +int main(int argc, FAR char **argv) +#else static int waitpid_main(int argc, char *argv[]) +#endif { pid_t me = getpid(); -- cgit v1.2.3