[Xenomai-git] Philippe Gerum : vxworks/task: fix spurious unlinking upon early deletion

2014-02-05 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 7e8527d25660ac6a12078a353ae1429c4c486a08
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7e8527d25660ac6a12078a353ae1429c4c486a08

Author: Philippe Gerum r...@xenomai.org
Date:   Mon Feb  3 12:00:04 2014 +0100

vxworks/task: fix spurious unlinking upon early deletion

---

 lib/vxworks/taskLib.c |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/vxworks/taskLib.c b/lib/vxworks/taskLib.c
index 1ef52a5..e3457a3 100644
--- a/lib/vxworks/taskLib.c
+++ b/lib/vxworks/taskLib.c
@@ -151,9 +151,11 @@ static void task_finalizer(struct threadobj *thobj)
 {
struct wind_task *task = container_of(thobj, struct wind_task, thobj);
 
-   write_lock_nocancel(wind_task_lock);
-   pvlist_remove(task-next);
-   write_unlock(wind_task_lock);
+   if (pvholder_linked(task-next)) {
+   write_lock_nocancel(wind_task_lock);
+   pvlist_remove(task-next);
+   write_unlock(wind_task_lock);
+   }
 
task-tcb-status |= WIND_DEAD;
cluster_delobj(wind_task_table, task-cobj);
@@ -356,6 +358,7 @@ static STATUS __taskInit(struct wind_task *task,
idata.finalizer = task_finalizer;
idata.priority = cprio;
threadobj_init(task-thobj, idata);
+   initpvh(task-next);
 
ret = __bt(cluster_addobj(wind_task_table, task-name, task-cobj));
if (ret) {


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Jan Kiszka : scripts/xeno-config-cobalt: Remove duplicate -I../cobalt

2014-02-05 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 177dce4109ea8bb4c220113cde05452487be6f6a
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=177dce4109ea8bb4c220113cde05452487be6f6a

Author: Jan Kiszka jan.kis...@siemens.com
Date:   Fri Jan 31 14:40:22 2014 +0100

scripts/xeno-config-cobalt: Remove duplicate -I../cobalt

Already part of XENO_BASE_CFLAGS.

Signed-off-by: Jan Kiszka jan.kis...@siemens.com

---

 scripts/xeno-config-cobalt.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/xeno-config-cobalt.in b/scripts/xeno-config-cobalt.in
index f8ce965..b853d94 100644
--- a/scripts/xeno-config-cobalt.in
+++ b/scripts/xeno-config-cobalt.in
@@ -128,7 +128,7 @@ while test $# -gt 0; do
echo no skin specified, missing --skin before --cflags 12
exit 1
fi
-   cflags=$XENO_BASE_CFLAGS -I$XENO_INCLUDE_DIR/cobalt
+   cflags=$XENO_BASE_CFLAGS
for skin in $skin_list; do
case $skin in
posix|cobalt)


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Jan Kiszka : scripts/xeno-config-cobalt: Only add cobalt wrapping to ldflags when required

2014-02-05 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 4e7c13eb9302047d8898f0242fd3a7457b553645
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=4e7c13eb9302047d8898f0242fd3a7457b553645

Author: Jan Kiszka jan.kis...@siemens.com
Date:   Mon Feb  3 13:43:44 2014 +0100

scripts/xeno-config-cobalt: Only add cobalt wrapping to ldflags when required

We do not need to wrap POSIX functions when there is no POSIX/cobalt
skin requested. If it is selected, insert the wrapping switches at the
front of ldflags.

Signed-off-by: Jan Kiszka jan.kis...@siemens.com

---

 scripts/xeno-config-cobalt.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/xeno-config-cobalt.in b/scripts/xeno-config-cobalt.in
index b853d94..665efc2 100644
--- a/scripts/xeno-config-cobalt.in
+++ b/scripts/xeno-config-cobalt.in
@@ -154,6 +154,7 @@ while test $# -gt 0; do
for skin in $skin_list; do
case $skin in
posix|cobalt)
+   ldflags=`dump_wrappers cobalt.wrappers` $ldflags
;;
vxworks|psos|alchemy)
copperplate=$WRAP_MAIN -lcopperplate
@@ -168,7 +169,6 @@ while test $# -gt 0; do
;;
esac
done
-   dump_wrappers cobalt.wrappers
echo $ldflags $copperplate $XENO_POSIX_LDFLAGS
;;
--core)


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Gernot Hillier : scripts/xeno-config: Fix native alias for --ldflags

2014-02-05 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 36d31894044434e23aefc3ca03dd955abd82a480
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=36d31894044434e23aefc3ca03dd955abd82a480

Author: Gernot Hillier gernot.hill...@siemens.com
Date:   Tue Jan 28 12:43:16 2014 +0100

scripts/xeno-config: Fix native alias for --ldflags

This also fixes a syntax error (== instead of =) in the previous
code.

Signed-off-by: Gernot Hillier gernot.hill...@siemens.com
[Jan: Folding syntax fix and extension to ldflags together]
Signed-off-by: Jan Kiszka jan.kis...@siemens.com

---

 scripts/xeno-config-cobalt.in  |9 +
 scripts/xeno-config-mercury.in |9 +
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/scripts/xeno-config-cobalt.in b/scripts/xeno-config-cobalt.in
index 69e741d..f8ce965 100644
--- a/scripts/xeno-config-cobalt.in
+++ b/scripts/xeno-config-cobalt.in
@@ -114,7 +114,11 @@ while test $# -gt 0; do
shift
;;
--skin=*)
-   skin_list=$skin_list `expr $1 : '--skin=\(.*\)'`
+   if [ $1 = --skin=native ]; then
+   skin_list=$skin_list alchemy
+else
+   skin_list=$skin_list `expr $1 : '--skin=\(.*\)'`
+   fi
;;
--posix|--cobalt|--vxworks|--psos|--alchemy)
skin_list=$skin_list `expr $1 : '--\(.*\)'`
@@ -126,9 +130,6 @@ while test $# -gt 0; do
fi
cflags=$XENO_BASE_CFLAGS -I$XENO_INCLUDE_DIR/cobalt
for skin in $skin_list; do
-   if [ $skin == native ]; then
-   skin=alchemy
-   fi
case $skin in
posix|cobalt)
;;
diff --git a/scripts/xeno-config-mercury.in b/scripts/xeno-config-mercury.in
index b583571..3b9c1c9 100644
--- a/scripts/xeno-config-mercury.in
+++ b/scripts/xeno-config-mercury.in
@@ -93,7 +93,11 @@ while test $# -gt 0; do
shift
;;
--skin=*)
-   skin_list=$skin_list `expr $1 : '--skin=\(.*\)'`
+   if [ $1 = --skin=native ]; then
+   skin_list=$skin_list alchemy
+else
+   skin_list=$skin_list `expr $1 : '--skin=\(.*\)'`
+   fi
;;
--vxworks|--psos|--alchemy)
skin_list=$skin_list `expr $1 : '--\(.*\)'`
@@ -105,9 +109,6 @@ while test $# -gt 0; do
fi
cflags=$XENO_BASE_CFLAGS
for skin in $skin_list; do
-   if [ $skin == native ]; then
-   skin=alchemy
-   fi
case $skin in
vxworks|psos|alchemy)
cflags=$cflags -I$XENO_INCLUDE_DIR/$skin


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Jan Kiszka : alchemy: Replace static variable no_alchemy_task with macro

2014-02-05 Thread git repository hosting
Module: xenomai-jki
Branch: for-forge
Commit: 182a5cc60eb30968e69e09c3382ab8b2a26e73e2
URL:
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=182a5cc60eb30968e69e09c3382ab8b2a26e73e2

Author: Jan Kiszka jan.kis...@siemens.com
Date:   Tue Feb  4 16:12:07 2014 +0100

alchemy: Replace static variable no_alchemy_task with macro

The current definition of a static const variable representing an
invalid alchemy task is both C++-incompatible and may leave variables in
the .bss of modules behind that are including task.h, even if they don't
use the symbol. So replace it with a macro that builds the required
struct on-the-fly.

Signed-off-by: Jan Kiszka jan.kis...@siemens.com

---

 include/alchemy/task.h |5 +
 lib/alchemy/mutex.c|4 ++--
 lib/alchemy/task.c |2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/include/alchemy/task.h b/include/alchemy/task.h
index 2d9e13e..b8f2ec0 100644
--- a/include/alchemy/task.h
+++ b/include/alchemy/task.h
@@ -80,10 +80,7 @@ struct RT_TASK_INFO {
 
 typedef struct RT_TASK_INFO RT_TASK_INFO;
 
-static const RT_TASK no_alchemy_task = {
-   .handle = 0,
-   .thread = 0
-};
+#define NO_ALCHEMY_TASK((RT_TASK){ 0, 0 })
 
 #ifdef __cplusplus
 extern C {
diff --git a/lib/alchemy/mutex.c b/lib/alchemy/mutex.c
index e10d360..4c4d980 100644
--- a/lib/alchemy/mutex.c
+++ b/lib/alchemy/mutex.c
@@ -111,7 +111,7 @@ int rt_mutex_create(RT_MUTEX *mutex, const char *name)
}
 
generate_name(mcb-name, name, mutex_namegen);
-   mcb-owner = no_alchemy_task;
+   mcb-owner = NO_ALCHEMY_TASK;
__RT(pthread_mutexattr_init(mattr));
__RT(pthread_mutexattr_setprotocol(mattr, PTHREAD_PRIO_INHERIT));
__RT(pthread_mutexattr_setpshared(mattr, mutex_scope_attribute));
@@ -409,7 +409,7 @@ int rt_mutex_inquire(RT_MUTEX *mutex, RT_MUTEX_INFO *info)
ret = 0;
} else {
__RT(pthread_mutex_unlock(mcb-lock));
-   info-owner = no_alchemy_task;
+   info-owner = NO_ALCHEMY_TASK;
}
 
strcpy(info-name, mcb-name);
diff --git a/lib/alchemy/task.c b/lib/alchemy/task.c
index fbb8cb7..fb86034 100644
--- a/lib/alchemy/task.c
+++ b/lib/alchemy/task.c
@@ -1975,6 +1975,6 @@ int rt_task_bind(RT_TASK *task,
  */
 int rt_task_unbind(RT_TASK *task)
 {
-   *task = no_alchemy_task;
+   *task = NO_ALCHEMY_TASK;
return 0;
 }


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Jan Kiszka : Fix stand-alone inclusion of API headers

2014-02-05 Thread git repository hosting
Module: xenomai-jki
Branch: for-forge
Commit: 041d7957603c9dc74263ef0137b7c92f41eab700
URL:
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=041d7957603c9dc74263ef0137b7c92f41eab700

Author: Jan Kiszka jan.kis...@siemens.com
Date:   Wed Feb  5 18:19:06 2014 +0100

Fix stand-alone inclusion of API headers

Found by including each of them without any other header, using --cflags
as provided by xeno-config.

Signed-off-by: Jan Kiszka jan.kis...@siemens.com

---

 include/analogy/command.h  |1 +
 include/cobalt/syslog.h|1 +
 include/vxworks/taskInfo.h |1 +
 3 files changed, 3 insertions(+)

diff --git a/include/analogy/command.h b/include/analogy/command.h
index d80842d..57eed7f 100644
--- a/include/analogy/command.h
+++ b/include/analogy/command.h
@@ -24,6 +24,7 @@
 #define __ANALOGY_CMD__
 
 #include analogy/context.h
+#include analogy/types.h
 
 /*!
  * @addtogroup async1_lib
diff --git a/include/cobalt/syslog.h b/include/cobalt/syslog.h
index 7f7d2c9..236c8a2 100644
--- a/include/cobalt/syslog.h
+++ b/include/cobalt/syslog.h
@@ -21,6 +21,7 @@
 #ifndef _COBALT_SYSLOG_H
 #define _COBALT_SYSLOG_H
 
+#include stdarg.h
 #include xeno_config.h
 #include cobalt/wrappers.h
 
diff --git a/include/vxworks/taskInfo.h b/include/vxworks/taskInfo.h
index 93a4571..0416efc 100644
--- a/include/vxworks/taskInfo.h
+++ b/include/vxworks/taskInfo.h
@@ -25,6 +25,7 @@
 #define _XENOMAI_VXWORKS_TASKINFO_H
 
 #include vxworks/types.h
+#include vxworks/taskLib.h
 
 typedef struct TASK_DESC {
TASK_ID td_tid;


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git