* [PATCH 1/2] lib/alchemy: fix rt_mutex_create return values
@ 2017-07-17 14:38 Henning Schild
2017-07-17 14:38 ` [PATCH] meta: dpkg: remove redundant 'addtask' Henning Schild
2017-07-17 14:38 ` [PATCH 2/2] lib/alchemy: change API context tags Henning Schild
0 siblings, 2 replies; 5+ messages in thread
From: Henning Schild @ 2017-07-17 14:38 UTC (permalink / raw)
To: isar-users; +Cc: Henning Schild
From: Henning Schild <henning.schild@siemens.com>
rt_mutex_create turned an -EPERM from the cobalt kernel syscall path
into an -EEXIST. If you have a model where threads create their
shadows on demand, when seeing the first -EPERM, that return value
must not be changed.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
lib/alchemy/mutex.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/lib/alchemy/mutex.c b/lib/alchemy/mutex.c
index 3aa55dd521..8c5e5f5968 100644
--- a/lib/alchemy/mutex.c
+++ b/lib/alchemy/mutex.c
@@ -96,7 +96,8 @@ static struct registry_operations registry_ops;
* registered mutex.
*
* - -EPERM is returned if this service was called from an
- * asynchronous context.
+ * asynchronous context. Or - in dual kernel - when the thread is not
+ * allowed to issue syscalls.
*
* @apitags{mode-unrestricted, switch-secondary}
*
@@ -147,12 +148,16 @@ int rt_mutex_create(RT_MUTEX *mutex, const char *name)
ret = 0;
}
- if (syncluster_addobj(&alchemy_mutex_table, mcb->name, &mcb->cobj)) {
+ if (ret = syncluster_addobj(&alchemy_mutex_table, mcb->name,
+ &mcb->cobj))
+ {
registry_destroy_file(&mcb->fsobj);
xnfree(mcb);
- ret = -EEXIST;
- } else
+ if (ret != -EPERM)
+ ret = -EEXIST;
+ } else {
mutex->handle = mainheap_ref(mcb, uintptr_t);
+ }
out:
CANCEL_RESTORE(svc);
--
2.13.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] meta: dpkg: remove redundant 'addtask'
2017-07-17 14:38 [PATCH 1/2] lib/alchemy: fix rt_mutex_create return values Henning Schild
@ 2017-07-17 14:38 ` Henning Schild
2017-07-22 22:11 ` Baurzhan Ismagulov
2017-07-17 14:38 ` [PATCH 2/2] lib/alchemy: change API context tags Henning Schild
1 sibling, 1 reply; 5+ messages in thread
From: Henning Schild @ 2017-07-17 14:38 UTC (permalink / raw)
To: isar-users; +Cc: Henning Schild
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
meta/classes/dpkg.bbclass | 1 -
1 file changed, 1 deletion(-)
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 455b090..f7ace54 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -10,7 +10,6 @@ do_unpack[deptask] = "do_build"
PP = "/home/builder/${PN}"
BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
-addtask fetch
do_fetch[dirs] = "${DL_DIR}"
# Fetch package from the source link
--
2.13.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] lib/alchemy: change API context tags
2017-07-17 14:38 [PATCH 1/2] lib/alchemy: fix rt_mutex_create return values Henning Schild
2017-07-17 14:38 ` [PATCH] meta: dpkg: remove redundant 'addtask' Henning Schild
@ 2017-07-17 14:38 ` Henning Schild
2017-07-17 14:39 ` Henning Schild
1 sibling, 1 reply; 5+ messages in thread
From: Henning Schild @ 2017-07-17 14:38 UTC (permalink / raw)
To: isar-users; +Cc: Henning Schild
From: Henning Schild <henning.schild@siemens.com>
changing the prio always changes the secondary-mode thread as well
see:
http://xenomai.org/migrating-from-xenomai-2-x-to-3-x/#Scheduling
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
lib/alchemy/task.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/alchemy/task.c b/lib/alchemy/task.c
index d647d5c0ee..12acafc495 100644
--- a/lib/alchemy/task.c
+++ b/lib/alchemy/task.c
@@ -1243,7 +1243,7 @@ RT_TASK *rt_task_self(void)
* - -EPERM is returned if @a task is NULL and this service was called
* from an invalid context.
*
- * @apitags{mode-unrestricted, switch-primary}
+ * @apitags{mode-unrestricted, switch-primary, switch-secondary}
*
* @note The caller must be an Alchemy task if @a task is NULL.
*
--
2.13.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] lib/alchemy: change API context tags
2017-07-17 14:38 ` [PATCH 2/2] lib/alchemy: change API context tags Henning Schild
@ 2017-07-17 14:39 ` Henning Schild
0 siblings, 0 replies; 5+ messages in thread
From: Henning Schild @ 2017-07-17 14:39 UTC (permalink / raw)
To: isar-users
Sorry those two where still setting in a tmp-folder. Not for Isar.
Henning
Am Mon, 17 Jul 2017 16:38:22 +0200
schrieb Henning Schild <henning.schild@siemens.com>:
> From: Henning Schild <henning.schild@siemens.com>
>
> changing the prio always changes the secondary-mode thread as well
> see:
> http://xenomai.org/migrating-from-xenomai-2-x-to-3-x/#Scheduling
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> lib/alchemy/task.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/alchemy/task.c b/lib/alchemy/task.c
> index d647d5c0ee..12acafc495 100644
> --- a/lib/alchemy/task.c
> +++ b/lib/alchemy/task.c
> @@ -1243,7 +1243,7 @@ RT_TASK *rt_task_self(void)
> * - -EPERM is returned if @a task is NULL and this service was
> called
> * from an invalid context.
> *
> - * @apitags{mode-unrestricted, switch-primary}
> + * @apitags{mode-unrestricted, switch-primary, switch-secondary}
> *
> * @note The caller must be an Alchemy task if @a task is NULL.
> *
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] meta: dpkg: remove redundant 'addtask'
2017-07-17 14:38 ` [PATCH] meta: dpkg: remove redundant 'addtask' Henning Schild
@ 2017-07-22 22:11 ` Baurzhan Ismagulov
0 siblings, 0 replies; 5+ messages in thread
From: Baurzhan Ismagulov @ 2017-07-22 22:11 UTC (permalink / raw)
To: isar-users
On Mon, Jul 17, 2017 at 04:38:21PM +0200, Henning Schild wrote:
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> meta/classes/dpkg.bbclass | 1 -
> 1 file changed, 1 deletion(-)
Applied.
With kind regards,
Baurzhan.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-22 22:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17 14:38 [PATCH 1/2] lib/alchemy: fix rt_mutex_create return values Henning Schild
2017-07-17 14:38 ` [PATCH] meta: dpkg: remove redundant 'addtask' Henning Schild
2017-07-22 22:11 ` Baurzhan Ismagulov
2017-07-17 14:38 ` [PATCH 2/2] lib/alchemy: change API context tags Henning Schild
2017-07-17 14:39 ` Henning Schild
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox