Fix some calls to task_create(): argv[0] is the first parameter, not the name of the task.

This commit is contained in:
Gregory Nutt 2017-05-09 10:59:24 -06:00
parent 5fbf2fd8d1
commit f473842f96
4 changed files with 4 additions and 21 deletions

View File

@ -160,17 +160,12 @@ errout:
static int start_daemon(void)
{
FAR char *alarmargv[2];
if (!g_alarm_daemon_started)
{
alarmargv[0] = "alarm_daemon";
alarmargv[1] = NULL;
g_alarm_daeon_pid =
task_create("alarm_daemon", CONFIG_EXAMPLES_ALARM_PRIORITY,
CONFIG_EXAMPLES_ALARM_STACKSIZE, alarm_daemon,
(FAR char * const *)alarmargv);
NULL);
if (g_alarm_daeon_pid < 0)
{
int errcode = errno;

View File

@ -514,7 +514,6 @@ int main(int argc, FAR char *argv[])
int canard_main(int argc, FAR char *argv[])
#endif
{
FAR char *canardargv[2];
int ret;
printf("canard_main: Starting canard_daemon\n");
@ -524,12 +523,9 @@ int canard_main(int argc, FAR char *argv[])
return EXIT_SUCCESS;
}
canardargv[0] = "canard_daemon";
canardargv[1] = NULL;
ret = task_create("canard_daemon", CONFIG_EXAMPLES_LIBCANARD_DAEMON_PRIORITY,
CONFIG_EXAMPLES_LIBCANARD_STACKSIZE, canard_daemon,
(FAR char *const *)canardargv);
NULL);
if (ret < 0)
{
int errcode = errno;

View File

@ -197,7 +197,6 @@ int main(int argc, FAR char *argv[])
int leds_main(int argc, FAR char *argv[])
#endif
{
FAR char *ledargv[2];
int ret;
printf("leds_main: Starting the led_daemon\n");
@ -207,12 +206,9 @@ int leds_main(int argc, FAR char *argv[])
return EXIT_SUCCESS;
}
ledargv[0] = "led_daemon";
ledargv[1] = NULL;
ret = task_create("led_daemon", CONFIG_EXAMPLES_LEDS_PRIORITY,
CONFIG_EXAMPLES_LEDS_STACKSIZE, led_daemon,
(FAR char * const *)ledargv);
NULL);
if (ret < 0)
{
int errcode = errno;

View File

@ -649,7 +649,6 @@ int main(int argc, FAR char *argv[])
int note_main(int argc, FAR char *argv[])
#endif
{
FAR char *ledargv[2];
int ret;
printf("note_main: Starting the note_daemon\n");
@ -659,12 +658,9 @@ int note_main(int argc, FAR char *argv[])
return EXIT_SUCCESS;
}
ledargv[0] = "note_daemon";
ledargv[1] = NULL;
ret = task_create("note_daemon", CONFIG_SYSTEM_NOTE_PRIORITY,
CONFIG_SYSTEM_NOTE_STACKSIZE, note_daemon,
(FAR char * const *)ledargv);
NULL);
if (ret < 0)
{
int errcode = errno;