All of lore.kernel.org
 help / color / mirror / Atom feed
From: "M. Koehrer" <mathias_koehrer@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] What happens if task entry function returns?
Date: Fri, 17 Nov 2006 11:17:56 +0100 (CET)	[thread overview]
Message-ID: <9656043.1163758677000.JavaMail.ngmail@domain.hid> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1450 bytes --]

Hi!

I am just playing around with Xenomai to understand it.
And I have one question concerning the entry function that will be called from
rt_task_start (Native API).
What happens if this entry function reaches its end or a return within the function is
called?

I have made a simple example that lead to strange effects.
In my example (see complete C Code in attachement) I create to tasks
that do the same.
The entry functions look like:

void taska(void *cookie)
{
    RTIME delay;
    int i;
    printf("Hi, I am task A %s\n", (char*)cookie);
    delay = 100000;

    for (i=0; i<200; i++)
    {
        rt_task_sleep(delay);
    }

    printf("This is the end of A\n");
    // rt_task_delete(0);
}
When I do not place the rt_task_delete(0) at the end of the function
my second task will never reach the end with the second printf.
Whenever I use rt_task_delete(0) at the end of the function it works perfectly.

My question is now: What happens if the task's entry function returns?

Thanks for any feedback on that question.

Regards

Mathias


-- 
Mathias Koehrer
mathias_koehrer@domain.hid


Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig
und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer,
nur  44,85 €  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2

[-- Attachment #2: multitasks.c.gz --]
[-- Type: application/postscript, Size: 562 bytes --]

             reply	other threads:[~2006-11-17 10:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-17 10:17 M. Koehrer [this message]
2006-11-17 10:59 ` [Xenomai-help] Re: What happens if task entry function returns? Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9656043.1163758677000.JavaMail.ngmail@domain.hid \
    --to=mathias_koehrer@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.