From: Philippe Gerum <rpm@xenomai.org>
To: Matthias Schneider <ma30002000@yahoo.de>,
"xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] FreeRTOS skin #2
Date: Wed, 09 Jul 2014 10:24:29 +0200 [thread overview]
Message-ID: <53BCFC3D.30403@xenomai.org> (raw)
In-Reply-To: <53BCF270.3010303@xenomai.org>
On 07/09/2014 09:42 AM, Philippe Gerum wrote:
> On 07/01/2014 06:48 PM, Matthias Schneider wrote:
>> Please find enclosed another calling the check_processors() only when
>> starting
>> the scheduler and remembering its output. It is also adapted to the
>> latest changes.
>> Any comments will be appreciated.
>>
>
> - clusters allowing key dups are available using the *_dup() call form
I just noticed that you would need uniquement labels for pushing your tasks to the registry anyway, so the following patch on top of the previous one would likely do:
diff --git a/lib/freertos/task.c b/lib/freertos/task.c
index d201711..d005163 100644
--- a/lib/freertos/task.c
+++ b/lib/freertos/task.c
@@ -426,10 +426,17 @@ static signed portBASE_TYPE __xTaskGenericCreate(struct freertos_task *task,
generate_name(task->name, (const char *)name, &task_namegen);
- ret = cluster_addobj_dup(&freertos_task_table, task->name, &task->cobj);
- if (__bt(ret)) {
- threadobj_uninit(&task->thobj);
- return pdFALSE;
+ for (;;) {
+ ret = cluster_addobj(&freertos_task_table, task->name, &task->cobj);
+ if (ret == -EEXIST) {
+ generate_name(task->name, NULL, &task_namegen);
+ continue;
+ }
+ if (__bt(ret)) {
+ threadobj_uninit(&task->thobj);
+ return pdFALSE;
+ }
+ break;
}
registry_init_file_obstack(&task->fsobj, ®istry_ops);
--
Philippe.
next prev parent reply other threads:[~2014-07-09 8:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 19:46 [Xenomai] FreeRTOS skin #2 Matthias Schneider
2014-06-02 18:46 ` Matthias Schneider
2014-06-20 7:55 ` Philippe Gerum
2014-06-23 10:31 ` Matthias Schneider
2014-06-23 20:27 ` Matthias Schneider
2014-07-01 16:48 ` Matthias Schneider
2014-07-09 7:42 ` Philippe Gerum
2014-07-09 8:24 ` Philippe Gerum [this message]
2014-07-14 19:12 ` Matthias Schneider
2014-07-14 19:18 ` Matthias Schneider
2014-07-14 20:15 ` Philippe Gerum
2014-07-09 7:46 ` Philippe Gerum
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=53BCFC3D.30403@xenomai.org \
--to=rpm@xenomai.org \
--cc=ma30002000@yahoo.de \
--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.