Fix some calls to task_create(): argv[0] is the first parameter, not the name of the task.
This commit is contained in:
parent
5fbf2fd8d1
commit
f473842f96
@ -160,17 +160,12 @@ errout:
|
|||||||
|
|
||||||
static int start_daemon(void)
|
static int start_daemon(void)
|
||||||
{
|
{
|
||||||
FAR char *alarmargv[2];
|
|
||||||
|
|
||||||
if (!g_alarm_daemon_started)
|
if (!g_alarm_daemon_started)
|
||||||
{
|
{
|
||||||
alarmargv[0] = "alarm_daemon";
|
|
||||||
alarmargv[1] = NULL;
|
|
||||||
|
|
||||||
g_alarm_daeon_pid =
|
g_alarm_daeon_pid =
|
||||||
task_create("alarm_daemon", CONFIG_EXAMPLES_ALARM_PRIORITY,
|
task_create("alarm_daemon", CONFIG_EXAMPLES_ALARM_PRIORITY,
|
||||||
CONFIG_EXAMPLES_ALARM_STACKSIZE, alarm_daemon,
|
CONFIG_EXAMPLES_ALARM_STACKSIZE, alarm_daemon,
|
||||||
(FAR char * const *)alarmargv);
|
NULL);
|
||||||
if (g_alarm_daeon_pid < 0)
|
if (g_alarm_daeon_pid < 0)
|
||||||
{
|
{
|
||||||
int errcode = errno;
|
int errcode = errno;
|
||||||
|
@ -514,7 +514,6 @@ int main(int argc, FAR char *argv[])
|
|||||||
int canard_main(int argc, FAR char *argv[])
|
int canard_main(int argc, FAR char *argv[])
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
FAR char *canardargv[2];
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("canard_main: Starting canard_daemon\n");
|
printf("canard_main: Starting canard_daemon\n");
|
||||||
@ -524,12 +523,9 @@ int canard_main(int argc, FAR char *argv[])
|
|||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
canardargv[0] = "canard_daemon";
|
|
||||||
canardargv[1] = NULL;
|
|
||||||
|
|
||||||
ret = task_create("canard_daemon", CONFIG_EXAMPLES_LIBCANARD_DAEMON_PRIORITY,
|
ret = task_create("canard_daemon", CONFIG_EXAMPLES_LIBCANARD_DAEMON_PRIORITY,
|
||||||
CONFIG_EXAMPLES_LIBCANARD_STACKSIZE, canard_daemon,
|
CONFIG_EXAMPLES_LIBCANARD_STACKSIZE, canard_daemon,
|
||||||
(FAR char *const *)canardargv);
|
NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
int errcode = errno;
|
int errcode = errno;
|
||||||
|
@ -197,7 +197,6 @@ int main(int argc, FAR char *argv[])
|
|||||||
int leds_main(int argc, FAR char *argv[])
|
int leds_main(int argc, FAR char *argv[])
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
FAR char *ledargv[2];
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("leds_main: Starting the led_daemon\n");
|
printf("leds_main: Starting the led_daemon\n");
|
||||||
@ -207,12 +206,9 @@ int leds_main(int argc, FAR char *argv[])
|
|||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ledargv[0] = "led_daemon";
|
|
||||||
ledargv[1] = NULL;
|
|
||||||
|
|
||||||
ret = task_create("led_daemon", CONFIG_EXAMPLES_LEDS_PRIORITY,
|
ret = task_create("led_daemon", CONFIG_EXAMPLES_LEDS_PRIORITY,
|
||||||
CONFIG_EXAMPLES_LEDS_STACKSIZE, led_daemon,
|
CONFIG_EXAMPLES_LEDS_STACKSIZE, led_daemon,
|
||||||
(FAR char * const *)ledargv);
|
NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
int errcode = errno;
|
int errcode = errno;
|
||||||
|
@ -649,7 +649,6 @@ int main(int argc, FAR char *argv[])
|
|||||||
int note_main(int argc, FAR char *argv[])
|
int note_main(int argc, FAR char *argv[])
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
FAR char *ledargv[2];
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("note_main: Starting the note_daemon\n");
|
printf("note_main: Starting the note_daemon\n");
|
||||||
@ -659,12 +658,9 @@ int note_main(int argc, FAR char *argv[])
|
|||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ledargv[0] = "note_daemon";
|
|
||||||
ledargv[1] = NULL;
|
|
||||||
|
|
||||||
ret = task_create("note_daemon", CONFIG_SYSTEM_NOTE_PRIORITY,
|
ret = task_create("note_daemon", CONFIG_SYSTEM_NOTE_PRIORITY,
|
||||||
CONFIG_SYSTEM_NOTE_STACKSIZE, note_daemon,
|
CONFIG_SYSTEM_NOTE_STACKSIZE, note_daemon,
|
||||||
(FAR char * const *)ledargv);
|
NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
int errcode = errno;
|
int errcode = errno;
|
||||||
|
Loading…
Reference in New Issue
Block a user