[Xenomai-git] Philippe Gerum : cobalt/arm: upgrade I-pipe support

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: refs/tags/v3.0-rc7
Commit: 1f34e06120ccde12cd28a447289f2b5d859979bc
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=1f34e06120ccde12cd28a447289f2b5d859979bc

Author: Philippe Gerum r...@xenomai.org
Date:   Fri Mar 20 09:25:13 2015 +0100

cobalt/arm: upgrade I-pipe support

---

 14.44-arm-11.patch = ipipe-core-3.14.44-arm-12.patch} |8 
 ...-3.18.12-arm-3.patch = ipipe-core-3.18.12-arm-4.patch} |   12 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-11.patch 
b/kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-12.patch
similarity index 99%
rename from kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-11.patch
rename to kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-12.patch
index eab2937..c44d632 100644
--- a/kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-11.patch
+++ b/kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-12.patch
@@ -1590,7 +1590,7 @@ index bb28af7..780ca50 100644
  static inline void sp804_clockevents_init(void __iomem *base, unsigned int 
irq, const char *name)
 diff --git a/arch/arm/include/asm/ipipe.h b/arch/arm/include/asm/ipipe.h
 new file mode 100644
-index 000..5ec5eff
+index 000..50e20e3
 --- /dev/null
 +++ b/arch/arm/include/asm/ipipe.h
 @@ -0,0 +1,272 @@
@@ -1638,7 +1638,7 @@ index 000..5ec5eff
 +#include linux/jump_label.h
 +#include linux/ipipe_trace.h
 +
-+#define IPIPE_CORE_RELEASE11
++#define IPIPE_CORE_RELEASE12
 +
 +struct ipipe_domain;
 +
@@ -2863,7 +2863,7 @@ index 000..6579eec
 +
 +#endif
 diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
-index 8d6a089..d78ed9a 100644
+index 8d6a089..60c89d6 100644
 --- a/arch/arm/include/asm/setup.h
 +++ b/arch/arm/include/asm/setup.h
 @@ -53,4 +53,10 @@ extern int arm_add_memory(u64 start, u64 size);
@@ -2871,7 +2871,7 @@ index 8d6a089..d78ed9a 100644
  extern void dump_machine_table(void);
  
 +#ifdef CONFIG_IPIPE
-+void __init smp_build_cpu_revmap(void);
++void smp_build_cpu_revmap(void);
 +#else
 +static inline void smp_build_cpu_revmap(void) { }
 +#endif
diff --git a/kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-3.patch 
b/kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-4.patch
similarity index 99%
rename from kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-3.patch
rename to kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-4.patch
index ea9675d..e6360b7 100644
--- a/kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-3.patch
+++ b/kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-4.patch
@@ -1651,7 +1651,7 @@ index bb28af7..780ca50 100644
  static inline void sp804_clockevents_init(void __iomem *base, unsigned int 
irq, const char *name)
 diff --git a/arch/arm/include/asm/ipipe.h b/arch/arm/include/asm/ipipe.h
 new file mode 100644
-index 000..4701f8d
+index 000..3c73753
 --- /dev/null
 +++ b/arch/arm/include/asm/ipipe.h
 @@ -0,0 +1,272 @@
@@ -1699,7 +1699,7 @@ index 000..4701f8d
 +#include linux/jump_label.h
 +#include linux/ipipe_trace.h
 +
-+#define IPIPE_CORE_RELEASE3
++#define IPIPE_CORE_RELEASE4
 +
 +struct ipipe_domain;
 +
@@ -2923,7 +2923,7 @@ index 000..6579eec
 +
 +#endif
 diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
-index e0adb9f..f024d86 100644
+index e0adb9f..5876f4b 100644
 --- a/arch/arm/include/asm/setup.h
 +++ b/arch/arm/include/asm/setup.h
 @@ -25,4 +25,10 @@ extern int arm_add_memory(u64 start, u64 size);
@@ -2931,7 +2931,7 @@ index e0adb9f..f024d86 100644
  extern void dump_machine_table(void);
  
 +#ifdef CONFIG_IPIPE
-+void __init smp_build_cpu_revmap(void);
++void smp_build_cpu_revmap(void);
 +#else
 +static inline void smp_build_cpu_revmap(void) { }
 +#endif
@@ -17772,7 +17772,7 @@ index 000..797a849
 +}
 diff --git a/kernel/ipipe/core.c b/kernel/ipipe/core.c
 new file mode 100644
-index 000..b8eb85c
+index 000..fba38fa
 --- /dev/null
 +++ b/kernel/ipipe/core.c
 @@ -0,0 +1,1890 @@
@@ -19030,7 +19030,7 @@ index 000..b8eb85c
 +   *   handling interrupts:
 +   *
 +   *   a) the root domain is alone, no registered head domain
-+   *  = all interrupts are delivered via the fast dispatcher.
++   *  = all interrupts go through the interrupt log
 +   *   b) a head domain is registered
 +   *  = head domain IRQs go through the fast dispatcher
 +   *  = root domain IRQs go through the interrupt log


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


[Xenomai-git] Philippe Gerum : vxworks/memPartLib: do not account for failed alloc

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: f928e4d39bf62c8bae1ceeda7d403d76e3a37ed8
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f928e4d39bf62c8bae1ceeda7d403d76e3a37ed8

Author: Philippe Gerum r...@xenomai.org
Date:   Wed Aug 12 10:31:14 2015 +0200

vxworks/memPartLib: do not account for failed alloc

---

 lib/vxworks/memPartLib.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/vxworks/memPartLib.c b/lib/vxworks/memPartLib.c
index 932fc90..09adb13 100644
--- a/lib/vxworks/memPartLib.c
+++ b/lib/vxworks/memPartLib.c
@@ -156,6 +156,8 @@ void *memPartAlloc(PART_ID partId, unsigned int nBytes)
__RT(pthread_mutex_lock(mp-lock));
 
p = heapobj_alloc(mp-hobj, nBytes);
+   if (p == NULL)
+   goto out;
 
mp-stats.numBytesAlloc += nBytes;
mp-stats.numBlocksAlloc++;
@@ -163,7 +165,7 @@ void *memPartAlloc(PART_ID partId, unsigned int nBytes)
mp-stats.numBlocksFree--;
if (mp-stats.numBytesAlloc  mp-stats.maxBytesAlloc)
mp-stats.maxBytesAlloc = mp-stats.numBytesAlloc;
-
+out:
__RT(pthread_mutex_unlock(mp-lock));
 
return p;


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


[Xenomai-git] Jan Kiszka : cobalt/arm: Detect software breakpoints

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 6dfdc69f5359d9a9945465e40800b605986bffba
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=6dfdc69f5359d9a9945465e40800b605986bffba

Author: Jan Kiszka jan.kis...@siemens.com
Date:   Tue Aug  4 15:13:17 2015 +0200

cobalt/arm: Detect software breakpoints

gdb injects software breakpoints as undefined instructions. Make sure we
detect them as well.

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

---

 kernel/cobalt/arch/arm/include/asm/xenomai/thread.h |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/cobalt/arch/arm/include/asm/xenomai/thread.h 
b/kernel/cobalt/arch/arm/include/asm/xenomai/thread.h
index 3d8e699..11439a3 100644
--- a/kernel/cobalt/arch/arm/include/asm/xenomai/thread.h
+++ b/kernel/cobalt/arch/arm/include/asm/xenomai/thread.h
@@ -56,7 +56,8 @@ struct xnarchtcb {
 
 #define xnarch_fault_pf_p(d)   ((d)-exception == IPIPE_TRAP_ACCESS)
 #define xnarch_fault_bp_p(d)   ((current-ptrace  PT_PTRACED)   \
-((d)-exception == IPIPE_TRAP_BREAK))
+((d)-exception == IPIPE_TRAP_BREAK || \
+ (d)-exception == IPIPE_TRAP_UNDEFINSTR))
 
 #define xnarch_fault_notify(d) (!xnarch_fault_bp_p(d))
 


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


[Xenomai-git] Philippe Gerum : copperplate/heapobj-pshared: fix and sanitize extent management

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 65f16f4a3f0d4de3be221bea6b4545b2b4d74321
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=65f16f4a3f0d4de3be221bea6b4545b2b4d74321

Author: Philippe Gerum r...@xenomai.org
Date:   Wed Aug 12 18:27:22 2015 +0200

copperplate/heapobj-pshared: fix and sanitize extent management

---

 lib/copperplate/heapobj-pshared.c |  278 +
 lib/copperplate/internal.h|3 -
 2 files changed, 159 insertions(+), 122 deletions(-)

diff --git a/lib/copperplate/heapobj-pshared.c 
b/lib/copperplate/heapobj-pshared.c
index 5fe899a..0df08c3 100644
--- a/lib/copperplate/heapobj-pshared.c
+++ b/lib/copperplate/heapobj-pshared.c
@@ -57,17 +57,17 @@ enum {
page_list =2
 };
 
-struct page_map {
+struct page_entry {
unsigned int type : 8;/* free, cont, list or log2 */
unsigned int bcount : 24; /* Number of active blocks. */
 };
 
 struct shared_extent {
struct holder link;
-   memoff_t membase;   /* Base address of the page array */
-   memoff_t memlim;/* Memory limit of page array */
-   memoff_t freelist;  /* Head of the free page list */
-   struct page_map pagemap[1]; /* Start of page map */
+   memoff_t membase;   /* Base offset of page array */
+   memoff_t memlim;/* Offset limit of page array */
+   memoff_t freelist;  /* Head of free page list */
+   struct page_entry pagemap[1]; /* Start of page map */
 };
 
 /*
@@ -75,7 +75,7 @@ struct shared_extent {
  * additional session-wide information.
  */
 struct session_heap {
-   struct shared_heap base;
+   struct shared_heap heap;
int cpid;
memoff_t maplen;
struct hash_table catalog;
@@ -91,6 +91,12 @@ struct session_heap {
  */
 void *__main_heap;
 #define main_heap  (*(struct session_heap *)__main_heap)
+/*
+ *  Base address for offset-based addressing, which is the start of
+ *  the session heap since all memory objects are allocated from it,
+ *  including other (sub-)heaps.
+ */
+#define main_base  __main_heap
 
 /* A table of shared clusters for the session. */
 struct hash_table *__main_catalog;
@@ -100,10 +106,10 @@ struct sysgroup *__main_sysgroup;
 
 static struct heapobj main_pool;
 
-#define __shoff(h, p)  ((caddr_t)(p) - (caddr_t)(h))
-#define __shoff_check(h, p)((p) ? __shoff(h, p) : 0)
-#define __shref(h, o)  ((void *)((caddr_t)(h) + (o)))
-#define __shref_check(h, o)((o) ? __shref(h, o) : NULL)
+#define __shoff(b, p)  ((caddr_t)(p) - (caddr_t)(b))
+#define __shoff_check(b, p)((p) ? __shoff(b, p) : 0)
+#define __shref(b, o)  ((void *)((caddr_t)(b) + (o)))
+#define __shref_check(b, o)((o) ? __shref(b, o) : NULL)
 
 static inline size_t __align_to(size_t size, size_t al)
 {
@@ -111,33 +117,39 @@ static inline size_t __align_to(size_t size, size_t al)
return ((size+al-1)(~(al-1)));
 }
 
-static inline size_t internal_overhead(size_t hsize)
+static inline size_t get_pagemap_size(size_t h)
 {
-   /* o = (h - o) * m / p + e
-  o * p = (h - o) * m + e * p
-  o * (p + m) = h * m + e * p
-  o = (h * m + e *p) / (p + m)
-   */
-   return __align_to((sizeof(struct shared_extent) * HOBJ_PAGE_SIZE
-  + sizeof(struct page_map) * hsize)
- / (HOBJ_PAGE_SIZE + sizeof(struct page_map)), 
HOBJ_PAGE_SIZE);
+   /*
+* Return the size of the meta data required to map 'h' bytes
+* of user memory in pages of HOBJ_PAGE_SIZE bytes. The meta
+* data includes the length of the extent descriptor, plus the
+* length of the page mapping array. 'h' must be a multiple of
+* HOBJ_PAGE_SIZE on entry.
+*/
+   assert((h  ~HOBJ_PAGE_MASK) == 0);
+   return __align_to((h  HOBJ_PAGE_SHIFT) * sizeof(struct page_entry)
+ + sizeof(struct shared_extent), HOBJ_PAGE_SIZE);
 }
 
-static void init_extent(struct shared_heap *heap, struct shared_extent *extent)
+static void init_extent(void *base, struct shared_extent *extent)
 {
caddr_t freepage;
int n, lastpgnum;
 
-   __holder_init_nocheck(heap, extent-link);
+   __holder_init_nocheck(base, extent-link);
 
-   /* The initial extent starts right after the header. */
-   extent-membase = __shoff(heap, extent) + heap-hdrsize;
-   lastpgnum = heap-npages - 1;
+   lastpgnum = ((extent-memlim - extent-membase)  HOBJ_PAGE_SHIFT) - 1;
+   /*
+* An extent must contain at least two addressable pages to
+* cope with allocation sizes between PAGESIZE and 2 *
+* PAGESIZE.
+*/
+   assert(lastpgnum = 1);
 
/* Mark each page as free in the page map. */
-   for (n = 0, freepage = __shref(heap, extent-membase);
+   for (n = 0, freepage = __shref(base, extent-membase);
 n  lastpgnum; n++, freepage += HOBJ_PAGE_SIZE) {

[Xenomai-git] Jan Kiszka : kernel/cobalt: Add reason to gorelax trace point

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: fab0540aa99966719e36b1b2b6715371d0dcf4f9
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=fab0540aa99966719e36b1b2b6715371d0dcf4f9

Author: Jan Kiszka jan.kis...@siemens.com
Date:   Wed Jul 29 17:30:47 2015 +0200

kernel/cobalt: Add reason to gorelax trace point

Trace and print the name of the relaxation reason whenever available.

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

---

 kernel/cobalt/thread.c|2 +-
 kernel/cobalt/trace/cobalt-core.h |   26 +++---
 2 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index 4cec6e7..2d1f840 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -1997,7 +1997,7 @@ void xnthread_relax(int notify, int reason)
 * domain to the Linux domain.  This will cause the Linux task
 * to resume using the register state of the shadow thread.
 */
-   trace_cobalt_shadow_gorelax(thread);
+   trace_cobalt_shadow_gorelax(thread, reason);
 
/*
 * If you intend to change the following interrupt-free
diff --git a/kernel/cobalt/trace/cobalt-core.h 
b/kernel/cobalt/trace/cobalt-core.h
index ee20b7c..d2b1c7e 100644
--- a/kernel/cobalt/trace/cobalt-core.h
+++ b/kernel/cobalt/trace/cobalt-core.h
@@ -357,9 +357,29 @@ DEFINE_EVENT(thread_event, cobalt_shadow_hardened,
TP_ARGS(thread)
 );
 
-DEFINE_EVENT(thread_event, cobalt_shadow_gorelax,
-   TP_PROTO(struct xnthread *thread),
-   TP_ARGS(thread)
+#define cobalt_print_relax_reason(reason)  \
+   __print_symbolic(reason,\
+{ SIGDEBUG_UNDEFINED,  undefined },  \
+{ SIGDEBUG_MIGRATE_SIGNAL, signal }, \
+{ SIGDEBUG_MIGRATE_SYSCALL,syscall },\
+{ SIGDEBUG_MIGRATE_FAULT,  fault })
+
+TRACE_EVENT(cobalt_shadow_gorelax,
+   TP_PROTO(struct xnthread *thread, int reason),
+   TP_ARGS(thread, reason),
+
+   TP_STRUCT__entry(
+   __field(struct xnthread *, thread)
+   __field(int, reason)
+   ),
+
+   TP_fast_assign(
+   __entry-thread = thread;
+   __entry-reason = reason;
+   ),
+
+   TP_printk(thread=%p reason=%s,
+ __entry-thread, cobalt_print_relax_reason(__entry-reason))
 );
 
 DEFINE_EVENT(thread_event, cobalt_shadow_relaxed,


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


[Xenomai-git] Philippe Gerum : copperplate/eventobj: add uninit cleanup helper

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 824d831c7218faa28014ad624d960b0926ece048
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=824d831c7218faa28014ad624d960b0926ece048

Author: Philippe Gerum r...@xenomai.org
Date:   Mon Aug 10 18:07:16 2015 +0200

copperplate/eventobj: add uninit cleanup helper

This one does not run the object finalizer, assuming a strictly
passive object (no waiters yet).

---

 include/copperplate/eventobj.h |2 ++
 lib/copperplate/eventobj.c |   12 
 2 files changed, 14 insertions(+)

diff --git a/include/copperplate/eventobj.h b/include/copperplate/eventobj.h
index a98ede9..3fc9416 100644
--- a/include/copperplate/eventobj.h
+++ b/include/copperplate/eventobj.h
@@ -82,6 +82,8 @@ int eventobj_init(struct eventobj *evobj,
 
 int eventobj_destroy(struct eventobj *evobj);
 
+void eventobj_uninit(struct eventobj *evobj);
+  
 int eventobj_post(struct eventobj *evobj,
  unsigned int bits);
 
diff --git a/lib/copperplate/eventobj.c b/lib/copperplate/eventobj.c
index 7cd1583..ff8c526 100644
--- a/lib/copperplate/eventobj.c
+++ b/lib/copperplate/eventobj.c
@@ -59,6 +59,13 @@ int eventobj_destroy(struct eventobj *evobj)
return 0;
 }
 
+void eventobj_uninit(struct eventobj *evobj)
+{
+   int ret = cobalt_event_destroy(evobj-core.event);
+   assert(ret == 0);
+   (void)ret;
+}
+
 int eventobj_wait(struct eventobj *evobj,
  unsigned int bits, unsigned int *bits_r,
  int mode, const struct timespec *timeout)
@@ -186,6 +193,11 @@ int eventobj_destroy(struct eventobj *evobj)
return 0;
 }
 
+void eventobj_uninit(struct eventobj *evobj)
+{
+   syncobj_uninit(evobj-core.sobj);
+}
+
 int eventobj_wait(struct eventobj *evobj,
  unsigned int bits, unsigned int *bits_r,
  int mode, const struct timespec *timeout)


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


[Xenomai-git] Philippe Gerum : copperplate/init: disambiguate --mem-pool-size argument

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: b151d3ba663ec5abd008ff2f3f4ce6b3ce9d02b2
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b151d3ba663ec5abd008ff2f3f4ce6b3ce9d02b2

Author: Philippe Gerum r...@xenomai.org
Date:   Thu Aug 13 17:07:42 2015 +0200

copperplate/init: disambiguate --mem-pool-size argument

The value passed to --mem-pool-size used to represent kilobytes, which
is at odds with the byte unit required by the mem_pool_size tunable.

--mem-pool-size now accepts a unit K|M|G suffix to values, defaulting
to bytes. For backward compatibility, any non-suffixed value below
65536 is interpreted as a count of kilobytes, not bytes,
e.g. --mem-pool-size=8192 will create a 8M heap for the
application. This conversion is noisy, to call for a parameter update
asap, unless --no-sanity is in effect.

If you need a tiny heap size below 64k, pass a kilobyte value with a 'K'
suffix.

---

 lib/copperplate/init.c |   20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/lib/copperplate/init.c b/lib/copperplate/init.c
index c84d8a2..d24673d 100644
--- a/lib/copperplate/init.c
+++ b/lib/copperplate/init.c
@@ -21,6 +21,7 @@
 #include stdlib.h
 #include unistd.h
 #include string.h
+#include ctype.h
 #include pwd.h
 #include errno.h
 #include getopt.h
@@ -193,9 +194,24 @@ static int copperplate_init(void)
 
 static int copperplate_parse_option(int optnum, const char *optarg)
 {
+   size_t memsz;
+
switch (optnum) {
case mempool_opt:
-   __copperplate_setup_data.mem_pool = atoi(optarg) * 1024;
+   memsz = get_mem_size(optarg);
+   if (memsz == 0)
+   return -EINVAL;
+   /*
+* Emulate former sloppy syntax: values below 64k are
+* likely to represent kilobytes, not bytes.
+*/
+   if (isdigit(optarg[strlen(optarg)-1]) 
+   memsz  64 * 1024) {
+   memsz *= 1024;
+   if (__base_setup_data.no_sanity == 0)
+   warning(--mem-pool-size=size[K|M|G], using 
%Zu bytes, memsz);
+   }
+   __copperplate_setup_data.mem_pool = memsz;
break;
case session_opt:
__copperplate_setup_data.session_label = strdup(optarg);
@@ -216,7 +232,7 @@ static int copperplate_parse_option(int optnum, const char 
*optarg)
 
 static void copperplate_help(void)
 {
-   fprintf(stderr, --mem-pool-size=sizeKsize of the main heap 
(kbytes)\n);
+   fprintf(stderr, --mem-pool-size=size[K|M|G]  size of the main 
heap\n);
 fprintf(stderr, --no-registry suppress object 
registration\n);
 fprintf(stderr, --shared-registry enable public access to 
registry\n);
 fprintf(stderr, --registry-root=pathroot path of 
registry\n);


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


[Xenomai-git] Philippe Gerum : cobalt/posix/sem: fix spurious wakeup on aborted wait

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 081cbb8b150f30a019245dfb0e2f0b92cc7f2dfd
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=081cbb8b150f30a019245dfb0e2f0b92cc7f2dfd

Author: Philippe Gerum r...@xenomai.org
Date:   Wed Jul 29 10:13:08 2015 +0200

cobalt/posix/sem: fix spurious wakeup on aborted wait

sem_wait() must not pull any waiter from the sleep queue when undoing
do_trywait() upon XNBREAK.

At this chance, fold a few routines to avoid unnecessary hops,
improving readability too.

---

 kernel/cobalt/posix/sem.c |  148 +
 1 file changed, 69 insertions(+), 79 deletions(-)

diff --git a/kernel/cobalt/posix/sem.c b/kernel/cobalt/posix/sem.c
index 1c47f2a..dc7ff0d 100644
--- a/kernel/cobalt/posix/sem.c
+++ b/kernel/cobalt/posix/sem.c
@@ -1,5 +1,6 @@
 /*
  * Written by Gilles Chanteperdrix gilles.chanteperd...@xenomai.org.
+ * Copyright (C) 2014,2015 Philippe Gerum r...@xenomai.org
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -30,6 +31,18 @@ static inline struct cobalt_resources *sem_kqueue(struct 
cobalt_sem *sem)
return cobalt_current_resources(pshared);
 }
 
+static inline int sem_check(struct cobalt_sem *sem)
+{
+   if (sem == NULL || sem-magic != COBALT_SEM_MAGIC)
+   return -EINVAL;
+
+   if (IS_ENABLED(CONFIG_XENO_OPT_DEBUG_POSIX_SYNCHRO) 
+   sem-resnode.scope  sem-resnode.scope != sem_kqueue(sem))
+   return -EPERM;
+
+   return 0;
+}
+
 int __cobalt_sem_destroy(xnhandle_t handle)
 {
struct cobalt_sem *sem;
@@ -170,51 +183,44 @@ static int sem_destroy(struct cobalt_sem_shadow *sm)
spl_t s;
 
xnlock_get_irqsave(nklock, s);
+
if (sm-magic != COBALT_SEM_MAGIC) {
ret = -EINVAL;
-   goto error;
+   goto fail;
}
 
sem = xnregistry_lookup(sm-handle, NULL);
-   if (!cobalt_obj_active(sem, COBALT_SEM_MAGIC, typeof(*sem))) {
-   ret = -EINVAL;
-   goto error;
-   }
-
-   if (sem-resnode.scope  sem_kqueue(sem) != sem-resnode.scope) {
-   ret = -EPERM;
-   goto error;
-   }
+   ret = sem_check(sem);
+   if (ret)
+   goto fail;
 
if ((sem-flags  SEM_NOBUSYDEL) != 0 
xnsynch_pended_p(sem-synchbase)) {
ret = -EBUSY;
-   goto error;
+   goto fail;
}
 
warn = sem-flags  SEM_WARNDEL;
cobalt_mark_deleted(sm);
+
xnlock_put_irqrestore(nklock, s);
 
ret = __cobalt_sem_destroy(sem-resnode.handle);
 
return warn ? ret : 0;
-
-  error:
-
+fail:
xnlock_put_irqrestore(nklock, s);
 
return ret;
 }
 
-static inline int sem_trywait_inner(struct cobalt_sem *sem)
+static inline int do_trywait(struct cobalt_sem *sem)
 {
-   if (sem == NULL || sem-magic != COBALT_SEM_MAGIC)
-   return -EINVAL;
-
-   if (IS_ENABLED(CONFIG_XENO_OPT_DEBUG_POSIX_SYNCHRO) 
-   sem-resnode.scope  sem-resnode.scope != sem_kqueue(sem))
-   return -EPERM;
+   int ret;
+   
+   ret = sem_check(sem);
+   if (ret)
+   return ret;
 
if (atomic_sub_return(1, sem-state-value)  0)
return -EAGAIN;
@@ -222,48 +228,6 @@ static inline int sem_trywait_inner(struct cobalt_sem *sem)
return 0;
 }
 
-static int sem_trywait(xnhandle_t handle)
-{
-   int err;
-   spl_t s;
-
-   xnlock_get_irqsave(nklock, s);
-   err = sem_trywait_inner(xnregistry_lookup(handle, NULL));
-   xnlock_put_irqrestore(nklock, s);
-
-   return err;
-}
-
-static int sem_post_inner(struct cobalt_sem *sem, int bcast)
-{
-   if (sem == NULL || sem-magic != COBALT_SEM_MAGIC)
-   return -EINVAL;
-
-   if (IS_ENABLED(CONFIG_XENO_OPT_DEBUG_POSIX_SYNCHRO) 
-   sem-resnode.scope  sem-resnode.scope != sem_kqueue(sem))
-   return -EPERM;
-
-   if (atomic_read(sem-state-value) == SEM_VALUE_MAX)
-   return -EINVAL;
-
-   if (!bcast) {
-   if (atomic_inc_return(sem-state-value) = 0) {
-   if (xnsynch_wakeup_one_sleeper(sem-synchbase))
-   xnsched_run();
-   } else if (sem-flags  SEM_PULSE)
-   atomic_set(sem-state-value, 0);
-   } else {
-   if (atomic_read(sem-state-value)  0) {
-   atomic_set(sem-state-value, 0);
-   if (xnsynch_flush(sem-synchbase, 0) ==
-   XNSYNCH_RESCHED)
-   xnsched_run();
-   }
-   }
-
-   return 0;
-}
-
 static int sem_wait(xnhandle_t handle)
 {
struct cobalt_sem *sem;
@@ -273,7 +237,7 @@ static int sem_wait(xnhandle_t handle)
xnlock_get_irqsave(nklock, s);
 
sem = 

[Xenomai-git] Jorge Ramirez-Ortiz : drivers/analogy: release pci region if mapping failed

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 328b0447cfa282fbe926ebbd9113224e4a1c18b9
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=328b0447cfa282fbe926ebbd9113224e4a1c18b9

Author: Jorge Ramirez-Ortiz jorge.ramirez-or...@linaro.org
Date:   Thu Aug 13 10:23:16 2015 -0400

drivers/analogy: release pci region if mapping failed

---

 kernel/drivers/analogy/national_instruments/mite.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/drivers/analogy/national_instruments/mite.c 
b/kernel/drivers/analogy/national_instruments/mite.c
index 84dbdda..be4b268 100644
--- a/kernel/drivers/analogy/national_instruments/mite.c
+++ b/kernel/drivers/analogy/national_instruments/mite.c
@@ -127,7 +127,7 @@ int a4l_mite_setup(struct mite_struct *mite, int 
use_iodwbsr_1)
 
pci_set_master(mite-pcidev);
 
-   if (pci_request_regions( mite-pcidev, mite)) {
+   if (pci_request_regions(mite-pcidev, mite)) {
__a4l_err(failed to request mite io regions\n);
return -EIO;
};
@@ -139,6 +139,7 @@ int a4l_mite_setup(struct mite_struct *mite, int 
use_iodwbsr_1)
mite-mite_io_addr = ioremap(addr, length);
if (!mite-mite_io_addr) {
__a4l_err(failed to remap mite io memory address\n);
+   pci_release_regions(mite-pcidev);
return -ENOMEM;
}
 
@@ -154,6 +155,7 @@ int a4l_mite_setup(struct mite_struct *mite, int 
use_iodwbsr_1)
mite-daq_io_addr = ioremap(mite-daq_phys_addr, length);
if (!mite-daq_io_addr) {
__a4l_err(failed to remap daq io memory address\n);
+   pci_release_regions(mite-pcidev);
return -ENOMEM;
}
 


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


[Xenomai-git] Philippe Gerum : copperplate/regd: do timed wait for anon connection

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: dcd9821a3b9212270de2f503d83bd2d1a3999695
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=dcd9821a3b9212270de2f503d83bd2d1a3999695

Author: Philippe Gerum r...@xenomai.org
Date:   Fri Jul 31 15:00:48 2015 +0200

copperplate/regd: do timed wait for anon connection

---

 lib/copperplate/regd/regd.c |   12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/copperplate/regd/regd.c b/lib/copperplate/regd/regd.c
index 4f48273..01ecc60 100644
--- a/lib/copperplate/regd/regd.c
+++ b/lib/copperplate/regd/regd.c
@@ -343,7 +343,7 @@ static void handle_requests(void)
FD_ZERO(refset);
FD_SET(sockfd, refset);
 
-   if (!(linger || anon)) {
+   if (!linger) {
tmfd = __STD(timerfd_create(CLOCK_MONOTONIC, 0));
if (tmfd  0)
error(1, errno, handle_requests/timerfd_create);
@@ -371,8 +371,14 @@ static void handle_requests(void)
continue;
}
FD_SET(s, refset);
-   if (tmfd != -1)
-   __STD(timerfd_settime(tmfd, 0, its, NULL));
+   if (tmfd != -1) {
+   if (anon) {
+   FD_CLR(tmfd, refset);
+   __STD(close(tmfd));
+   tmfd = -1;
+   } else
+   __STD(timerfd_settime(tmfd, 0, its, 
NULL));
+   }
}
if (tmfd != -1  FD_ISSET(tmfd, set)) {
ret = __STD(read(tmfd, exp, sizeof(exp)));


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


[Xenomai-git] Jorge Ramirez-Ortiz : utils/analogy: fix debug message

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 69ab2204c1f03bb657158e346c2d979edc896fb4
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=69ab2204c1f03bb657158e346c2d979edc896fb4

Author: Jorge Ramirez-Ortiz j...@xenomai.org
Date:   Thu Aug  6 15:57:08 2015 -0400

utils/analogy: fix debug message

Signed-off-by: Jorge Ramirez-Ortiz jorge.ramirez-or...@linaro.org

---

 utils/analogy/calibration_ni_m.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/analogy/calibration_ni_m.c b/utils/analogy/calibration_ni_m.c
index c72a44d..6f9be6f 100644
--- a/utils/analogy/calibration_ni_m.c
+++ b/utils/analogy/calibration_ni_m.c
@@ -973,7 +973,7 @@ static int ni_m_calibrate_ai(void)
 * calibrate low, medium and high gain ranges
 */
for (i = 0; i  ARRAY_LEN(cal_info); i++) {
-   __debug(Calibrating AI: %s \n, cal_info[i]);
+   __debug(Calibrating AI: %s \n, cal_info[i].message);
 
if (cal_info[i].range = 0)
goto calibrate;


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


[Xenomai-git] Philippe Gerum : testsuite/latency: disable -t1/2 over Mercury

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: f7c2f662a7a435ffc32af8eb7f1d7bf574dd12c2
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f7c2f662a7a435ffc32af8eb7f1d7bf574dd12c2

Author: Philippe Gerum r...@xenomai.org
Date:   Fri Jul 31 11:38:35 2015 +0200

testsuite/latency: disable -t1/2 over Mercury

---

 testsuite/latency/latency.c |5 +
 1 file changed, 5 insertions(+)

diff --git a/testsuite/latency/latency.c b/testsuite/latency/latency.c
index bbc4317..e800361 100644
--- a/testsuite/latency/latency.c
+++ b/testsuite/latency/latency.c
@@ -732,6 +732,11 @@ int main(int argc, char *const *argv)
if (test_mode  USER_TASK || test_mode  TIMER_HANDLER)
error(1, EINVAL, invalid test mode);
 
+#ifdef CONFIG_XENO_MERCURY
+   if (test_mode != USER_TASK)
+   error(1, EINVAL, -t1, -t2 not allowed over Mercury);
+#endif
+   
time(test_start);
 
histogram_avg = calloc(histogram_size, sizeof(int32_t));


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


[Xenomai-git] Jorge Ramirez-Ortiz : lib/analogy: validate size of calibration file

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 4120d9751c9124d35782b525b7c677a4f20f042c
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=4120d9751c9124d35782b525b7c677a4f20f042c

Author: Jorge Ramirez-Ortiz j...@xenomai.org
Date:   Thu Aug  6 16:38:15 2015 -0400

lib/analogy: validate size of calibration file

Signed-off-by: Jorge Ramirez-Ortiz jorge.ramirez-or...@linaro.org

---

 lib/analogy/calibration.c |4 
 1 file changed, 4 insertions(+)

diff --git a/lib/analogy/calibration.c b/lib/analogy/calibration.c
index c54cd7d..14ca454 100644
--- a/lib/analogy/calibration.c
+++ b/lib/analogy/calibration.c
@@ -200,10 +200,14 @@ int a4l_read_calibration_file(char *name, struct 
a4l_calibration_data *data)
int i, j, k, index = -1, nb_elements = -1;
struct a4l_calibration_subdev_data *p = NULL;
struct _dictionary_ *d;
+   struct stat st;
 
if (access(name, R_OK))
return -1;
 
+   if (stat(name, st) || !st.st_size)
+   return -1;
+
d = iniparser_load(name);
if (d == NULL)
return -1;


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


[Xenomai-git] Philippe Gerum : cobalt/sh: drop support for the SH4 architecture

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: b9e809f9ddf03684a6e38b35b847391326db10a0
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b9e809f9ddf03684a6e38b35b847391326db10a0

Author: Philippe Gerum r...@xenomai.org
Date:   Sat Aug 15 16:15:36 2015 +0200

cobalt/sh: drop support for the SH4 architecture

We don't have any interrupt pipeline implementation for 3.x+ kernels
on SH4, currently which is a requirement for running Xenomai 3, so
there is no point in keeping this architecture code in-tree.

---

 configure.ac   |8 -
 kernel/cobalt/arch/sh/Kconfig  |   21 --
 kernel/cobalt/arch/sh/Makefile |6 -
 .../arch/sh/include/asm/xenomai/calibration.h  |   38 ---
 .../cobalt/arch/sh/include/asm/xenomai/features.h  |   30 --
 kernel/cobalt/arch/sh/include/asm/xenomai/fptest.h |   44 ---
 .../cobalt/arch/sh/include/asm/xenomai/machine.h   |   38 ---
 .../cobalt/arch/sh/include/asm/xenomai/syscall.h   |   57 
 .../cobalt/arch/sh/include/asm/xenomai/syscall32.h |   24 --
 kernel/cobalt/arch/sh/include/asm/xenomai/thread.h |   76 -
 .../arch/sh/include/asm/xenomai/uapi/arith.h   |   35 ---
 .../arch/sh/include/asm/xenomai/uapi/features.h|   44 ---
 .../arch/sh/include/asm/xenomai/uapi/fptest.h  |   31 --
 .../arch/sh/include/asm/xenomai/uapi/syscall.h |   23 --
 .../cobalt/arch/sh/include/asm/xenomai/wrappers.h  |   24 --
 kernel/cobalt/arch/sh/machine.c|   60 
 kernel/cobalt/arch/sh/mayday.c |   99 --
 kernel/cobalt/arch/sh/patches/README   |   18 --
 kernel/cobalt/arch/sh/thread.c |  315 
 kernel/cobalt/arch/sh/trampoline.S |   32 --
 lib/cobalt/arch/Makefile.am|2 +-
 lib/cobalt/arch/sh/Makefile.am |   13 -
 lib/cobalt/arch/sh/features.c  |   63 
 lib/cobalt/arch/sh/include/Makefile.am |2 -
 lib/cobalt/arch/sh/include/asm/Makefile.am |2 -
 lib/cobalt/arch/sh/include/asm/xenomai/Makefile.am |5 -
 lib/cobalt/arch/sh/include/asm/xenomai/features.h  |   30 --
 lib/cobalt/arch/sh/include/asm/xenomai/syscall.h   |  116 ---
 lib/cobalt/arch/sh/include/asm/xenomai/tsc.h   |   54 
 29 files changed, 1 insertion(+), 1309 deletions(-)

diff --git a/configure.ac b/configure.ac
index 701d9fd..6db4031 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,10 +148,6 @@ case $build_for in
XENO_TARGET_ARCH=nios2
CONFIG_XENO_DEFAULT_PERIOD=1000
;;
- sh-*|sh4-*)
-   XENO_TARGET_ARCH=sh
-   CONFIG_XENO_DEFAULT_PERIOD=10
-   ;;
  *) echo 
echo ***
echo Still unsupported target: $build_for -- Sorry.
@@ -880,10 +876,6 @@ AC_CONFIG_FILES([ \
lib/cobalt/arch/nios2/include/Makefile \
lib/cobalt/arch/nios2/include/asm/Makefile \
lib/cobalt/arch/nios2/include/asm/xenomai/Makefile \
-   lib/cobalt/arch/sh/Makefile \
-   lib/cobalt/arch/sh/include/Makefile \
-   lib/cobalt/arch/sh/include/asm/Makefile \
-   lib/cobalt/arch/sh/include/asm/xenomai/Makefile \
lib/mercury/Makefile \
lib/copperplate/Makefile \
lib/copperplate/regd/Makefile \
diff --git a/kernel/cobalt/arch/sh/Kconfig b/kernel/cobalt/arch/sh/Kconfig
deleted file mode 100644
index af23fa0..000
--- a/kernel/cobalt/arch/sh/Kconfig
+++ /dev/null
@@ -1,21 +0,0 @@
-config IPIPE_WANT_ACTIVE_MM
-bool
-
-config XENO_ARCH_FPU
-   def_bool SH_FPU
-
-config XENO_ARCH_SYS3264
-def_bool n
-
-menu Machine/platform-specific options
-
-config IPIPE_WANT_PREEMPTIBLE_SWITCH
-bool
-   select IPIPE_WANT_ACTIVE_MM
-   default y if XENO_ARCH_UNLOCKED_SWITCH
-   default n if !XENO_ARCH_UNLOCKED_SWITCH
-
-endmenu
-
-source kernel/xenomai/Kconfig
-source drivers/xenomai/Kconfig
diff --git a/kernel/cobalt/arch/sh/Makefile b/kernel/cobalt/arch/sh/Makefile
deleted file mode 100644
index 82477a1..000
--- a/kernel/cobalt/arch/sh/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-obj-$(CONFIG_XENOMAI) += xenomai.o
-
-xenomai-y := machine.o mayday.o thread.o trampoline.o
-
-ccflags-y := -Iarch/sh/xenomai/include -Iinclude/xenomai
diff --git a/kernel/cobalt/arch/sh/include/asm/xenomai/calibration.h 
b/kernel/cobalt/arch/sh/include/asm/xenomai/calibration.h
deleted file mode 100644
index 834febf..000
--- a/kernel/cobalt/arch/sh/include/asm/xenomai/calibration.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2011 Philippe Gerum r...@xenomai.org.
- *
- * Xenomai is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * 

[Xenomai-git] Philippe Gerum : cobalt/sh: drop support for the SH4 architecture

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: b9e809f9ddf03684a6e38b35b847391326db10a0
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b9e809f9ddf03684a6e38b35b847391326db10a0

Author: Philippe Gerum r...@xenomai.org
Date:   Sat Aug 15 16:15:36 2015 +0200

cobalt/sh: drop support for the SH4 architecture

We don't have any interrupt pipeline implementation for 3.x+ kernels
on SH4, currently which is a requirement for running Xenomai 3, so
there is no point in keeping this architecture code in-tree.

---

 configure.ac   |8 -
 kernel/cobalt/arch/sh/Kconfig  |   21 --
 kernel/cobalt/arch/sh/Makefile |6 -
 .../arch/sh/include/asm/xenomai/calibration.h  |   38 ---
 .../cobalt/arch/sh/include/asm/xenomai/features.h  |   30 --
 kernel/cobalt/arch/sh/include/asm/xenomai/fptest.h |   44 ---
 .../cobalt/arch/sh/include/asm/xenomai/machine.h   |   38 ---
 .../cobalt/arch/sh/include/asm/xenomai/syscall.h   |   57 
 .../cobalt/arch/sh/include/asm/xenomai/syscall32.h |   24 --
 kernel/cobalt/arch/sh/include/asm/xenomai/thread.h |   76 -
 .../arch/sh/include/asm/xenomai/uapi/arith.h   |   35 ---
 .../arch/sh/include/asm/xenomai/uapi/features.h|   44 ---
 .../arch/sh/include/asm/xenomai/uapi/fptest.h  |   31 --
 .../arch/sh/include/asm/xenomai/uapi/syscall.h |   23 --
 .../cobalt/arch/sh/include/asm/xenomai/wrappers.h  |   24 --
 kernel/cobalt/arch/sh/machine.c|   60 
 kernel/cobalt/arch/sh/mayday.c |   99 --
 kernel/cobalt/arch/sh/patches/README   |   18 --
 kernel/cobalt/arch/sh/thread.c |  315 
 kernel/cobalt/arch/sh/trampoline.S |   32 --
 lib/cobalt/arch/Makefile.am|2 +-
 lib/cobalt/arch/sh/Makefile.am |   13 -
 lib/cobalt/arch/sh/features.c  |   63 
 lib/cobalt/arch/sh/include/Makefile.am |2 -
 lib/cobalt/arch/sh/include/asm/Makefile.am |2 -
 lib/cobalt/arch/sh/include/asm/xenomai/Makefile.am |5 -
 lib/cobalt/arch/sh/include/asm/xenomai/features.h  |   30 --
 lib/cobalt/arch/sh/include/asm/xenomai/syscall.h   |  116 ---
 lib/cobalt/arch/sh/include/asm/xenomai/tsc.h   |   54 
 29 files changed, 1 insertion(+), 1309 deletions(-)

diff --git a/configure.ac b/configure.ac
index 701d9fd..6db4031 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,10 +148,6 @@ case $build_for in
XENO_TARGET_ARCH=nios2
CONFIG_XENO_DEFAULT_PERIOD=1000
;;
- sh-*|sh4-*)
-   XENO_TARGET_ARCH=sh
-   CONFIG_XENO_DEFAULT_PERIOD=10
-   ;;
  *) echo 
echo ***
echo Still unsupported target: $build_for -- Sorry.
@@ -880,10 +876,6 @@ AC_CONFIG_FILES([ \
lib/cobalt/arch/nios2/include/Makefile \
lib/cobalt/arch/nios2/include/asm/Makefile \
lib/cobalt/arch/nios2/include/asm/xenomai/Makefile \
-   lib/cobalt/arch/sh/Makefile \
-   lib/cobalt/arch/sh/include/Makefile \
-   lib/cobalt/arch/sh/include/asm/Makefile \
-   lib/cobalt/arch/sh/include/asm/xenomai/Makefile \
lib/mercury/Makefile \
lib/copperplate/Makefile \
lib/copperplate/regd/Makefile \
diff --git a/kernel/cobalt/arch/sh/Kconfig b/kernel/cobalt/arch/sh/Kconfig
deleted file mode 100644
index af23fa0..000
--- a/kernel/cobalt/arch/sh/Kconfig
+++ /dev/null
@@ -1,21 +0,0 @@
-config IPIPE_WANT_ACTIVE_MM
-bool
-
-config XENO_ARCH_FPU
-   def_bool SH_FPU
-
-config XENO_ARCH_SYS3264
-def_bool n
-
-menu Machine/platform-specific options
-
-config IPIPE_WANT_PREEMPTIBLE_SWITCH
-bool
-   select IPIPE_WANT_ACTIVE_MM
-   default y if XENO_ARCH_UNLOCKED_SWITCH
-   default n if !XENO_ARCH_UNLOCKED_SWITCH
-
-endmenu
-
-source kernel/xenomai/Kconfig
-source drivers/xenomai/Kconfig
diff --git a/kernel/cobalt/arch/sh/Makefile b/kernel/cobalt/arch/sh/Makefile
deleted file mode 100644
index 82477a1..000
--- a/kernel/cobalt/arch/sh/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-obj-$(CONFIG_XENOMAI) += xenomai.o
-
-xenomai-y := machine.o mayday.o thread.o trampoline.o
-
-ccflags-y := -Iarch/sh/xenomai/include -Iinclude/xenomai
diff --git a/kernel/cobalt/arch/sh/include/asm/xenomai/calibration.h 
b/kernel/cobalt/arch/sh/include/asm/xenomai/calibration.h
deleted file mode 100644
index 834febf..000
--- a/kernel/cobalt/arch/sh/include/asm/xenomai/calibration.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2011 Philippe Gerum r...@xenomai.org.
- *
- * Xenomai is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Xenomai is distributed in the hope that it will be useful, but
- * 

[Xenomai-git] Philippe Gerum : cobalt/nios2: drop support for the NIOS2 architecture

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 942192837c147c5fd03fd180a8a5adb0b663c926
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=942192837c147c5fd03fd180a8a5adb0b663c926

Author: Philippe Gerum r...@xenomai.org
Date:   Sat Aug 15 16:15:36 2015 +0200

cobalt/nios2: drop support for the NIOS2 architecture

We don't have any interrupt pipeline implementation for 3.x+ kernels
on NIOS2 currently, which is a requirement for running Xenomai 3, so
there is no point in keeping this architecture code in-tree.

---

 configure.ac   |   18 +--
 kernel/cobalt/arch/nios2/Kconfig   |8 -
 kernel/cobalt/arch/nios2/Makefile  |6 -
 .../arch/nios2/include/asm/xenomai/calibration.h   |   40 -
 .../arch/nios2/include/asm/xenomai/features.h  |   30 
 .../cobalt/arch/nios2/include/asm/xenomai/fptest.h |   44 --
 .../arch/nios2/include/asm/xenomai/machine.h   |   38 -
 .../arch/nios2/include/asm/xenomai/syscall.h   |   59 
 .../arch/nios2/include/asm/xenomai/syscall32.h |   24 ---
 .../cobalt/arch/nios2/include/asm/xenomai/thread.h |   70 -
 .../arch/nios2/include/asm/xenomai/uapi/arith.h|   40 -
 .../arch/nios2/include/asm/xenomai/uapi/features.h |   44 --
 .../arch/nios2/include/asm/xenomai/uapi/fptest.h   |   31 
 .../arch/nios2/include/asm/xenomai/uapi/syscall.h  |   25 
 .../arch/nios2/include/asm/xenomai/wrappers.h  |   26 
 kernel/cobalt/arch/nios2/machine.c |   61 
 kernel/cobalt/arch/nios2/mayday.c  |   95 
 kernel/cobalt/arch/nios2/patches/README|   19 ---
 kernel/cobalt/arch/nios2/switch.S  |   56 ---
 kernel/cobalt/arch/nios2/syscall.c |   41 --
 kernel/cobalt/arch/nios2/thread.c  |   67 -
 lib/cobalt/arch/Makefile.am|2 +-
 lib/cobalt/arch/nios2/Makefile.am  |   13 --
 lib/cobalt/arch/nios2/features.c   |   54 ---
 lib/cobalt/arch/nios2/include/Makefile.am  |2 -
 lib/cobalt/arch/nios2/include/asm/Makefile.am  |2 -
 .../arch/nios2/include/asm/xenomai/Makefile.am |5 -
 .../arch/nios2/include/asm/xenomai/features.h  |   30 
 .../arch/nios2/include/asm/xenomai/syscall.h   |  155 
 lib/cobalt/arch/nios2/include/asm/xenomai/tsc.h|   73 -
 30 files changed, 2 insertions(+), 1176 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6db4031..8f2136e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,10 +144,6 @@ case $build_for in
XENO_TARGET_ARCH=x86
CONFIG_XENO_DEFAULT_PERIOD=10
;;
- nios2-*)
-   XENO_TARGET_ARCH=nios2
-   CONFIG_XENO_DEFAULT_PERIOD=1000
-   ;;
  *) echo 
echo ***
echo Still unsupported target: $build_for -- Sorry.
@@ -158,15 +154,7 @@ esac
 
 AC_MSG_RESULT([$XENO_TARGET_ARCH])
 AM_CONDITIONAL(XENO_TARGET_ARCH_X86,[test $XENO_TARGET_ARCH = x86])
-
-case $XENO_TARGET_ARCH in
- nios2)
-   AC_DISABLE_SHARED
-   ;;
- *)
-   AC_ENABLE_SHARED
-   ;;
-esac
+AC_ENABLE_SHARED
 AC_PROG_LIBTOOL
 
 dnl
@@ -872,10 +860,6 @@ AC_CONFIG_FILES([ \
lib/cobalt/arch/x86/include/Makefile \
lib/cobalt/arch/x86/include/asm/Makefile \
lib/cobalt/arch/x86/include/asm/xenomai/Makefile \
-   lib/cobalt/arch/nios2/Makefile \
-   lib/cobalt/arch/nios2/include/Makefile \
-   lib/cobalt/arch/nios2/include/asm/Makefile \
-   lib/cobalt/arch/nios2/include/asm/xenomai/Makefile \
lib/mercury/Makefile \
lib/copperplate/Makefile \
lib/copperplate/regd/Makefile \
diff --git a/kernel/cobalt/arch/nios2/Kconfig b/kernel/cobalt/arch/nios2/Kconfig
deleted file mode 100644
index 1ca0278..000
--- a/kernel/cobalt/arch/nios2/Kconfig
+++ /dev/null
@@ -1,8 +0,0 @@
-config XENO_ARCH_FPU
-   def_bool n
-
-config XENO_ARCH_SYS3264
-def_bool n
-
-source kernel/xenomai/Kconfig
-source drivers/xenomai/Kconfig
diff --git a/kernel/cobalt/arch/nios2/Makefile 
b/kernel/cobalt/arch/nios2/Makefile
deleted file mode 100644
index ce960c8..000
--- a/kernel/cobalt/arch/nios2/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-obj-$(CONFIG_XENOMAI) += xenomai.o
-
-xenomai-y := machine.o mayday.o thread.o switch.o syscall.o
-
-ccflags-y := -Iarch/nios2/xenomai/include -Iinclude/xenomai
diff --git a/kernel/cobalt/arch/nios2/include/asm/xenomai/calibration.h 
b/kernel/cobalt/arch/nios2/include/asm/xenomai/calibration.h
deleted file mode 100644
index 36cc2a5..000
--- a/kernel/cobalt/arch/nios2/include/asm/xenomai/calibration.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2009 Philippe Gerum r...@xenomai.org.
- *
- * Xenomai is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * 

[Xenomai-git] Philippe Gerum : cobalt/arm: upgrade I-pipe support

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 1f34e06120ccde12cd28a447289f2b5d859979bc
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=1f34e06120ccde12cd28a447289f2b5d859979bc

Author: Philippe Gerum r...@xenomai.org
Date:   Fri Mar 20 09:25:13 2015 +0100

cobalt/arm: upgrade I-pipe support

---

 14.44-arm-11.patch = ipipe-core-3.14.44-arm-12.patch} |8 
 ...-3.18.12-arm-3.patch = ipipe-core-3.18.12-arm-4.patch} |   12 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-11.patch 
b/kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-12.patch
similarity index 99%
rename from kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-11.patch
rename to kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-12.patch
index eab2937..c44d632 100644
--- a/kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-11.patch
+++ b/kernel/cobalt/arch/arm/patches/ipipe-core-3.14.44-arm-12.patch
@@ -1590,7 +1590,7 @@ index bb28af7..780ca50 100644
  static inline void sp804_clockevents_init(void __iomem *base, unsigned int 
irq, const char *name)
 diff --git a/arch/arm/include/asm/ipipe.h b/arch/arm/include/asm/ipipe.h
 new file mode 100644
-index 000..5ec5eff
+index 000..50e20e3
 --- /dev/null
 +++ b/arch/arm/include/asm/ipipe.h
 @@ -0,0 +1,272 @@
@@ -1638,7 +1638,7 @@ index 000..5ec5eff
 +#include linux/jump_label.h
 +#include linux/ipipe_trace.h
 +
-+#define IPIPE_CORE_RELEASE11
++#define IPIPE_CORE_RELEASE12
 +
 +struct ipipe_domain;
 +
@@ -2863,7 +2863,7 @@ index 000..6579eec
 +
 +#endif
 diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
-index 8d6a089..d78ed9a 100644
+index 8d6a089..60c89d6 100644
 --- a/arch/arm/include/asm/setup.h
 +++ b/arch/arm/include/asm/setup.h
 @@ -53,4 +53,10 @@ extern int arm_add_memory(u64 start, u64 size);
@@ -2871,7 +2871,7 @@ index 8d6a089..d78ed9a 100644
  extern void dump_machine_table(void);
  
 +#ifdef CONFIG_IPIPE
-+void __init smp_build_cpu_revmap(void);
++void smp_build_cpu_revmap(void);
 +#else
 +static inline void smp_build_cpu_revmap(void) { }
 +#endif
diff --git a/kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-3.patch 
b/kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-4.patch
similarity index 99%
rename from kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-3.patch
rename to kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-4.patch
index ea9675d..e6360b7 100644
--- a/kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-3.patch
+++ b/kernel/cobalt/arch/arm/patches/ipipe-core-3.18.12-arm-4.patch
@@ -1651,7 +1651,7 @@ index bb28af7..780ca50 100644
  static inline void sp804_clockevents_init(void __iomem *base, unsigned int 
irq, const char *name)
 diff --git a/arch/arm/include/asm/ipipe.h b/arch/arm/include/asm/ipipe.h
 new file mode 100644
-index 000..4701f8d
+index 000..3c73753
 --- /dev/null
 +++ b/arch/arm/include/asm/ipipe.h
 @@ -0,0 +1,272 @@
@@ -1699,7 +1699,7 @@ index 000..4701f8d
 +#include linux/jump_label.h
 +#include linux/ipipe_trace.h
 +
-+#define IPIPE_CORE_RELEASE3
++#define IPIPE_CORE_RELEASE4
 +
 +struct ipipe_domain;
 +
@@ -2923,7 +2923,7 @@ index 000..6579eec
 +
 +#endif
 diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
-index e0adb9f..f024d86 100644
+index e0adb9f..5876f4b 100644
 --- a/arch/arm/include/asm/setup.h
 +++ b/arch/arm/include/asm/setup.h
 @@ -25,4 +25,10 @@ extern int arm_add_memory(u64 start, u64 size);
@@ -2931,7 +2931,7 @@ index e0adb9f..f024d86 100644
  extern void dump_machine_table(void);
  
 +#ifdef CONFIG_IPIPE
-+void __init smp_build_cpu_revmap(void);
++void smp_build_cpu_revmap(void);
 +#else
 +static inline void smp_build_cpu_revmap(void) { }
 +#endif
@@ -17772,7 +17772,7 @@ index 000..797a849
 +}
 diff --git a/kernel/ipipe/core.c b/kernel/ipipe/core.c
 new file mode 100644
-index 000..b8eb85c
+index 000..fba38fa
 --- /dev/null
 +++ b/kernel/ipipe/core.c
 @@ -0,0 +1,1890 @@
@@ -19030,7 +19030,7 @@ index 000..b8eb85c
 +   *   handling interrupts:
 +   *
 +   *   a) the root domain is alone, no registered head domain
-+   *  = all interrupts are delivered via the fast dispatcher.
++   *  = all interrupts go through the interrupt log
 +   *   b) a head domain is registered
 +   *  = head domain IRQs go through the fast dispatcher
 +   *  = root domain IRQs go through the interrupt log


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


[Xenomai-git] Philippe Gerum : cobalt/sched: add start, stop SCHED_TP config operations

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 08af0a3457514230180cce05b3e0eda751a377db
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=08af0a3457514230180cce05b3e0eda751a377db

Author: Philippe Gerum r...@xenomai.org
Date:   Thu Jul 30 14:16:04 2015 +0200

cobalt/sched: add start, stop SCHED_TP config operations

We may want to start/stop a TP schedule without removing it from the
CPU entirely. To this end, this commit introduces the
sched_tp_start/stop requests, processed by sched_config_np().

---

 include/cobalt/kernel/compat.h  |1 +
 include/cobalt/uapi/sched.h |8 +
 kernel/cobalt/posix/sched.c |   30 +---
 kernel/cobalt/posix/syscall32.c |4 +++
 kernel/cobalt/sched-tp.c|9 +++--
 lib/cobalt/thread.c |   72 ---
 6 files changed, 97 insertions(+), 27 deletions(-)

diff --git a/include/cobalt/kernel/compat.h b/include/cobalt/kernel/compat.h
index 7420804..b0ef81e 100644
--- a/include/cobalt/kernel/compat.h
+++ b/include/cobalt/kernel/compat.h
@@ -61,6 +61,7 @@ struct compat_sched_tp_window {
 };
 
 struct __compat_sched_config_tp {
+   int op;
int nr_windows;
struct compat_sched_tp_window windows[0];
 };
diff --git a/include/cobalt/uapi/sched.h b/include/cobalt/uapi/sched.h
index fc04f49..b672095 100644
--- a/include/cobalt/uapi/sched.h
+++ b/include/cobalt/uapi/sched.h
@@ -57,7 +57,15 @@ struct sched_tp_window {
int ptid;
 };
 
+enum {
+   sched_tp_install,
+   sched_tp_uninstall,
+   sched_tp_start,
+   sched_tp_stop,
+};
+   
 struct __sched_config_tp {
+   int op;
int nr_windows;
struct sched_tp_window windows[0];
 };
diff --git a/kernel/cobalt/posix/sched.c b/kernel/cobalt/posix/sched.c
index 0e7d405..be2e441 100644
--- a/kernel/cobalt/posix/sched.c
+++ b/kernel/cobalt/posix/sched.c
@@ -242,14 +242,35 @@ int set_tp_config(int cpu, union sched_config *config, 
size_t len)
if (len  sizeof(config-tp))
return -EINVAL;
 
-   if (config-tp.nr_windows == 0) {
+   sched = xnsched_struct(cpu);
+
+   switch (config-tp.op) {
+   case sched_tp_install:
+   if (config-tp.nr_windows  0)
+   break;
+   /* Fallback wanted. */
+   case sched_tp_uninstall:
gps = NULL;
goto set_schedule;
+   case sched_tp_start:
+   xnlock_get_irqsave(nklock, s);
+   xnsched_tp_start_schedule(sched);
+   xnlock_put_irqrestore(nklock, s);
+   return 0;
+   case sched_tp_stop:
+   xnlock_get_irqsave(nklock, s);
+   xnsched_tp_stop_schedule(sched);
+   xnlock_put_irqrestore(nklock, s);
+   return 0;
+   default:
+   return -EINVAL;
}
 
+   /* Install a new TP schedule on CPU. */
+
gps = xnmalloc(sizeof(*gps) + config-tp.nr_windows * sizeof(*w));
if (gps == NULL)
-   goto fail;
+   return -ENOMEM;
 
for (n = 0, p = config-tp.windows, w = gps-pwins, next_offset = 0;
 n  config-tp.nr_windows; n++, p++, w++) {
@@ -279,10 +300,8 @@ int set_tp_config(int cpu, union sched_config *config, 
size_t len)
gps-pwin_nr = n;
gps-tf_duration = next_offset;
 set_schedule:
-   sched = xnsched_struct(cpu);
xnlock_get_irqsave(nklock, s);
ogps = xnsched_tp_set_schedule(sched, gps);
-   xnsched_tp_start_schedule(sched);
xnlock_put_irqrestore(nklock, s);
 
if (ogps)
@@ -292,7 +311,7 @@ set_schedule:
 
 cleanup_and_fail:
xnfree(gps);
-fail:
+
return -EINVAL;
 }
 
@@ -333,6 +352,7 @@ ssize_t get_tp_config(int cpu, void __user *u_config, 
size_t len,
goto out;
}
 
+   config-tp.op = sched_tp_install;
config-tp.nr_windows = gps-pwin_nr;
for (n = 0, pp = p = config-tp.windows, pw = w = gps-pwins;
 n  gps-pwin_nr; pp = p, p++, pw = w, w++, n++) {
diff --git a/kernel/cobalt/posix/syscall32.c b/kernel/cobalt/posix/syscall32.c
index 78d3c57..b3ce8a7 100644
--- a/kernel/cobalt/posix/syscall32.c
+++ b/kernel/cobalt/posix/syscall32.c
@@ -341,6 +341,7 @@ sys32_fetch_config(int policy, const void __user *u_config, 
size_t *len)
if (policy == SCHED_QUOTA)
memcpy(buf-quota, cbuf-quota, sizeof(cbuf-quota));
else {
+   buf-tp.op = cbuf-tp.op;
buf-tp.nr_windows = cbuf-tp.nr_windows;
for (n = 0; n  buf-tp.nr_windows; n++) {
buf-tp.windows[n].ptid = cbuf-tp.windows[n].ptid;
@@ -387,9 +388,12 @@ static ssize_t sys32_put_config(int policy,
sizeof(u_p-quota.info);
}
 
+   /* SCHED_TP */
+
if (u_len  compat_sched_tp_confsz(config-tp.nr_windows))
return -ENOSPC;
 
+   __xn_put_user(config-tp.op, u_p-tp.op);

[Xenomai-git] Philippe Gerum : alchemy/sem: prevent double-free on error path

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: ac6fb1c0c7b0eefed103a9ae963a201595c22f2a
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ac6fb1c0c7b0eefed103a9ae963a201595c22f2a

Author: Philippe Gerum r...@xenomai.org
Date:   Mon Aug 10 18:08:04 2015 +0200

alchemy/sem: prevent double-free on error path

We don't want the finalizer to run for the underlying sema4 object
when cleaning up upon error at creation. Call the uninit helper
instead.

---

 lib/alchemy/sem.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/alchemy/sem.c b/lib/alchemy/sem.c
index cf4add9..4b967ed 100644
--- a/lib/alchemy/sem.c
+++ b/lib/alchemy/sem.c
@@ -226,7 +226,7 @@ int rt_sem_create(RT_SEM *sem, const char *name,
 
if (syncluster_addobj(alchemy_sem_table, scb-name, scb-cobj)) {
registry_destroy_file(scb-fsobj);
-   semobj_destroy(scb-smobj);
+   semobj_uninit(scb-smobj);
xnfree(scb);
ret = -EEXIST;
} else


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


[Xenomai-git] Philippe Gerum : copperplate/heapobj-pshared: change rounding of page mapping array size

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: f522e9bd42c6f790c67716ee795d9db984640254
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f522e9bd42c6f790c67716ee795d9db984640254

Author: Philippe Gerum r...@xenomai.org
Date:   Fri Aug 14 09:36:27 2015 +0200

copperplate/heapobj-pshared: change rounding of page mapping array size

---

 lib/copperplate/heapobj-pshared.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/copperplate/heapobj-pshared.c 
b/lib/copperplate/heapobj-pshared.c
index 0df08c3..c1631e5 100644
--- a/lib/copperplate/heapobj-pshared.c
+++ b/lib/copperplate/heapobj-pshared.c
@@ -128,7 +128,7 @@ static inline size_t get_pagemap_size(size_t h)
 */
assert((h  ~HOBJ_PAGE_MASK) == 0);
return __align_to((h  HOBJ_PAGE_SHIFT) * sizeof(struct page_entry)
- + sizeof(struct shared_extent), HOBJ_PAGE_SIZE);
+ + sizeof(struct shared_extent), HOBJ_MINALIGNSZ);
 }
 
 static void init_extent(void *base, struct shared_extent *extent)


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


[Xenomai-git] Philippe Gerum : testsuite/smokey: fail if out of TP schedule

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 73151aa4dd5089ff8d937655b77cd22166043832
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=73151aa4dd5089ff8d937655b77cd22166043832

Author: Philippe Gerum r...@xenomai.org
Date:   Thu Jul 30 09:12:29 2015 +0200

testsuite/smokey: fail if out of TP schedule

---

 testsuite/smokey/sched-tp/sched-tp.c |   64 ++
 1 file changed, 58 insertions(+), 6 deletions(-)

diff --git a/testsuite/smokey/sched-tp/sched-tp.c 
b/testsuite/smokey/sched-tp/sched-tp.c
index 4f5f7bc..f28de54 100644
--- a/testsuite/smokey/sched-tp/sched-tp.c
+++ b/testsuite/smokey/sched-tp/sched-tp.c
@@ -11,6 +11,7 @@
 #include memory.h
 #include malloc.h
 #include unistd.h
+#include string.h
 #include signal.h
 #include pthread.h
 #include semaphore.h
@@ -33,6 +34,18 @@ static pthread_t threadA, threadB, threadC;
 
 static sem_t barrier;
 
+static const char ref_schedule[] =
+   CCBAACCBAACCBAACC
+   BAACCBAACCBAACCBAA
+   CCBAACCBAACCBAACC
+   BAACCBAACCBAA;
+
+static char schedule[sizeof(ref_schedule) + 8], *curr = schedule;
+
+static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+
+static int overflow;
+
 static void *thread_body(void *arg)
 {
pthread_t me = pthread_self();
@@ -58,10 +71,22 @@ static void *thread_body(void *arg)
sem_post(barrier);
 
for (;;) {
-   putchar('A' + part);
-   fflush(stdout);
+   /*
+* The mutex is there in case the scheduler behaves in
+* a really weird way so that we don't write out of
+* bounds; otherwise no serialization should happen
+* due to this lock.
+*/
+   pthread_mutex_lock(lock);
+   if (curr = schedule + sizeof(schedule)) {
+   pthread_mutex_unlock(lock);
+   overflow = 1;
+   break;
+   }
+   *curr++ = 'A' + part;
+   pthread_mutex_unlock(lock);
ts.tv_sec = 0;
-   ts.tv_nsec = 1000;
+   ts.tv_nsec = 1050;
clock_nanosleep(CLOCK_MONOTONIC, 0, ts, NULL);
}
 
@@ -106,6 +131,7 @@ static int run_sched_tp(struct smokey_test *t, int argc, 
char *const argv[])
union sched_config *p;
int ret, n, policies;
size_t len;
+   char *s;
 
ret = cobalt_corectl(_CC_COBALT_GET_POLICIES, policies, 
sizeof(policies));
if (ret || (policies  _CC_COBALT_SCHED_TP) == 0)
@@ -136,6 +162,7 @@ static int run_sched_tp(struct smokey_test *t, int argc, 
char *const argv[])
if (p == NULL)
error(1, ENOMEM, malloc);
 
+   p-tp.op = sched_tp_install;
p-tp.nr_windows = NR_WINDOWS;
p-tp.windows[0].offset.tv_sec = 0;
p-tp.windows[0].offset.tv_nsec = 0;
@@ -158,10 +185,10 @@ static int run_sched_tp(struct smokey_test *t, int argc, 
char *const argv[])
p-tp.windows[3].duration.tv_nsec = 23000;
p-tp.windows[3].ptid = -1;
 
-   /* Assign the TP schedule to CPU #0 */
+   /* Assign the TP schedule to CPU #0 */
ret = sched_setconfig_np(0, SCHED_TP, p, len);
if (ret)
-   error(1, ret, sched_setconfig_np);
+   error(1, ret, sched_setconfig_np(install));
 
memset(p, 0xa5, len);
 
@@ -183,11 +210,36 @@ static int run_sched_tp(struct smokey_test *t, int argc, 
char *const argv[])
create_thread(threadA, 0);
create_thread(threadB, 1);
create_thread(threadC, 2);
-   sem_post(barrier);
 
+   /* Start the TP schedule. */
+   len = sched_tp_confsz(0);
+   p-tp.op = sched_tp_start;
+   ret = sched_setconfig_np(0, SCHED_TP, p, len);
+   if (ret)
+   error(1, ret, sched_setconfig_np(start));
+
+   sem_post(barrier);
sleep(5);
cleanup();
sem_destroy(barrier);
+   free(p);
+
+   if (overflow) {
+   smokey_warning(schedule overflowed);
+   return -EPROTO;
+   }
+
+   /*
+* The first time window might be decreased for enough time to
+* skip an iteration due to lingering inits, and a few more
+* marks may be generated while we are busy stopping the
+* threads, so we look for a valid sub-sequence.
+*/
+   s = strstr(ref_schedule, schedule);
+   if (s == NULL || s - ref_schedule  1) {
+   smokey_warning(unexpected schedule:\n%s, schedule);
+   return -EPROTO;
+   }
 
return 0;
 }


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


[Xenomai-git] Philippe Gerum : lib/smokey: fix warning printout

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 8105820cc5afaad309c3242cac65531836dc22d3
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=8105820cc5afaad309c3242cac65531836dc22d3

Author: Philippe Gerum r...@xenomai.org
Date:   Wed Jul 29 16:17:45 2015 +0200

lib/smokey: fix warning printout

---

 include/smokey/smokey.h |2 +-
 lib/smokey/helpers.c|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/smokey/smokey.h b/include/smokey/smokey.h
index cd2840a..7dcc06b 100644
--- a/include/smokey/smokey.h
+++ b/include/smokey/smokey.h
@@ -129,7 +129,7 @@ struct smokey_test {
})
 
 #define smokey_warning(__fmt, __args...)   \
-   __smokey_warning(__FILE__, __LINE__, __fmt, #__args)
+   __smokey_warning(__FILE__, __LINE__, __fmt, ##__args)
 
 #ifdef __cplusplus
 extern C {
diff --git a/lib/smokey/helpers.c b/lib/smokey/helpers.c
index 60764b8..6c7d3d7 100644
--- a/lib/smokey/helpers.c
+++ b/lib/smokey/helpers.c
@@ -156,7 +156,7 @@ void __smokey_warning(const char *file, int lineno,
if (smokey_verbose_mode) {
__RT(fprintf(stderr, %s:%d, , basename(file), lineno));
__RT(vfprintf(stderr, fmt, ap));
-   __RT(fprintf(stdout, \n));
+   __RT(fprintf(stderr, \n));
}
 
va_end(ap);


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


[Xenomai-git] Philippe Gerum : cobalt: bump ABI revision level

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 67ed1e447fc69d54590da6ec6c41e645b0d73b27
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=67ed1e447fc69d54590da6ec6c41e645b0d73b27

Author: Philippe Gerum r...@xenomai.org
Date:   Thu Jul 30 14:20:45 2015 +0200

cobalt: bump ABI revision level

---

 kernel/cobalt/arch/arm/include/asm/xenomai/uapi/features.h  |2 +-
 kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/features.h |2 +-
 kernel/cobalt/arch/nios2/include/asm/xenomai/uapi/features.h|2 +-
 kernel/cobalt/arch/powerpc/include/asm/xenomai/uapi/features.h  |2 +-
 kernel/cobalt/arch/sh/include/asm/xenomai/uapi/features.h   |2 +-
 kernel/cobalt/arch/x86/include/asm/xenomai/uapi/features.h  |2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/kernel/cobalt/arch/arm/include/asm/xenomai/uapi/features.h 
b/kernel/cobalt/arch/arm/include/asm/xenomai/uapi/features.h
index 4504fce..fe50182 100644
--- a/kernel/cobalt/arch/arm/include/asm/xenomai/uapi/features.h
+++ b/kernel/cobalt/arch/arm/include/asm/xenomai/uapi/features.h
@@ -22,7 +22,7 @@
 #define _COBALT_ARM_ASM_UAPI_FEATURES_H
 
 /* The ABI revision level we use on this arch. */
-#define XENOMAI_ABI_REV   14UL
+#define XENOMAI_ABI_REV   15UL
 
 #define XENOMAI_FEAT_DEP (__xn_feat_generic_mask)
 
diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/features.h 
b/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/features.h
index 63a2ebc..1a86ee7 100644
--- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/features.h
+++ b/kernel/cobalt/arch/blackfin/include/asm/xenomai/uapi/features.h
@@ -19,7 +19,7 @@
 #define _COBALT_BLACKFIN_ASM_UAPI_FEATURES_H
 
 /* The ABI revision level we use on this arch. */
-#define XENOMAI_ABI_REV   14UL
+#define XENOMAI_ABI_REV   15UL
 
 #define XENOMAI_FEAT_DEP  __xn_feat_generic_mask
 
diff --git a/kernel/cobalt/arch/nios2/include/asm/xenomai/uapi/features.h 
b/kernel/cobalt/arch/nios2/include/asm/xenomai/uapi/features.h
index d7a7d4c..ff9aacc 100644
--- a/kernel/cobalt/arch/nios2/include/asm/xenomai/uapi/features.h
+++ b/kernel/cobalt/arch/nios2/include/asm/xenomai/uapi/features.h
@@ -21,7 +21,7 @@
 #include linux/types.h
 
 /* The ABI revision level we use on this arch. */
-#define XENOMAI_ABI_REV   13UL
+#define XENOMAI_ABI_REV   14UL
 
 #define XENOMAI_FEAT_DEP  __xn_feat_generic_mask
 
diff --git a/kernel/cobalt/arch/powerpc/include/asm/xenomai/uapi/features.h 
b/kernel/cobalt/arch/powerpc/include/asm/xenomai/uapi/features.h
index 8d56e21..124c1de 100644
--- a/kernel/cobalt/arch/powerpc/include/asm/xenomai/uapi/features.h
+++ b/kernel/cobalt/arch/powerpc/include/asm/xenomai/uapi/features.h
@@ -19,7 +19,7 @@
 #define _COBALT_POWERPC_ASM_UAPI_FEATURES_H
 
 /* The ABI revision level we use on this arch. */
-#define XENOMAI_ABI_REV   14UL
+#define XENOMAI_ABI_REV   15UL
 
 #define XENOMAI_FEAT_DEP  __xn_feat_generic_mask
 
diff --git a/kernel/cobalt/arch/sh/include/asm/xenomai/uapi/features.h 
b/kernel/cobalt/arch/sh/include/asm/xenomai/uapi/features.h
index ddb29b9..c5465d8 100644
--- a/kernel/cobalt/arch/sh/include/asm/xenomai/uapi/features.h
+++ b/kernel/cobalt/arch/sh/include/asm/xenomai/uapi/features.h
@@ -21,7 +21,7 @@
 #include linux/types.h
 
 /* The ABI revision level we use on this arch. */
-#define XENOMAI_ABI_REV   11UL
+#define XENOMAI_ABI_REV   12UL
 
 #define XENOMAI_FEAT_DEP  __xn_feat_generic_mask
 
diff --git a/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/features.h 
b/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/features.h
index cb9aedd..723cc75 100644
--- a/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/features.h
+++ b/kernel/cobalt/arch/x86/include/asm/xenomai/uapi/features.h
@@ -19,7 +19,7 @@
 #define _COBALT_X86_ASM_UAPI_FEATURES_H
 
 /* The ABI revision level we use on this arch. */
-#define XENOMAI_ABI_REV   14UL
+#define XENOMAI_ABI_REV   15UL
 
 #define XENOMAI_FEAT_DEP  __xn_feat_generic_mask
 


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


[Xenomai-git] Philippe Gerum : testsuite/smokey: fail if out of quota

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 7c4492ac779b049204c39a617f9ee22b72f81c37
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=7c4492ac779b049204c39a617f9ee22b72f81c37

Author: Philippe Gerum r...@xenomai.org
Date:   Wed Jul 29 16:18:36 2015 +0200

testsuite/smokey: fail if out of quota

---

 testsuite/smokey/sched-quota/sched-quota.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/testsuite/smokey/sched-quota/sched-quota.c 
b/testsuite/smokey/sched-quota/sched-quota.c
index e51c78e..3f7a8ea 100644
--- a/testsuite/smokey/sched-quota/sched-quota.c
+++ b/testsuite/smokey/sched-quota/sched-quota.c
@@ -9,6 +9,7 @@
 #include stdlib.h
 #include limits.h
 #include unistd.h
+#include math.h
 #include pthread.h
 #include semaphore.h
 #include sched.h
@@ -328,5 +329,11 @@ static int run_sched_quota(struct smokey_test *t, int 
argc, char *const argv[])
smokey_trace(%d thread%s: cap=%d%%, effective=%.1f%%,
 nrthreads, nrthreads  1 ? s: , quota, effective);
 
+   if (fabs(effective - (double)quota)  0.5) {
+   smokey_warning(out of quota: %.1f%%,
+  effective - (double)quota);
+   return -EPROTO;
+   }
+
return 0;
 }


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


[Xenomai-git] Philippe Gerum : lib/cobalt/heapobj: pshared: allow group access to heap

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 033976af9db37d77dbb0c0422658bf7df0680104
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=033976af9db37d77dbb0c0422658bf7df0680104

Author: Philippe Gerum r...@xenomai.org
Date:   Thu Aug  6 09:49:16 2015 +0200

lib/cobalt/heapobj: pshared: allow group access to heap

Allow users who belong to the same group to access the shared heap,
provided umask allows it too.

---

 lib/copperplate/heapobj-pshared.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/copperplate/heapobj-pshared.c 
b/lib/copperplate/heapobj-pshared.c
index 61769c9..5fe899a 100644
--- a/lib/copperplate/heapobj-pshared.c
+++ b/lib/copperplate/heapobj-pshared.c
@@ -628,7 +628,7 @@ static int create_main_heap(pid_t *cnode_r)
snprintf(hobj-fsname, sizeof(hobj-fsname),
 /xeno:%s, hobj-name);
 
-   fd = shm_open(hobj-fsname, O_RDWR|O_CREAT, 0600);
+   fd = shm_open(hobj-fsname, O_RDWR|O_CREAT, 0660);
if (fd  0)
return __bt(-errno);
 


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


[Xenomai-git] Philippe Gerum : boilerplate: add EPROTO to translated errors

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 983e58e5d21cb131c3e0231171a59dc3e88430cb
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=983e58e5d21cb131c3e0231171a59dc3e88430cb

Author: Philippe Gerum r...@xenomai.org
Date:   Wed Jul 29 16:18:15 2015 +0200

boilerplate: add EPROTO to translated errors

---

 lib/boilerplate/ancillaries.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/boilerplate/ancillaries.c b/lib/boilerplate/ancillaries.c
index 3c6feef..6c8be35 100644
--- a/lib/boilerplate/ancillaries.c
+++ b/lib/boilerplate/ancillaries.c
@@ -155,6 +155,7 @@ static const char *__esym_map[] = {
__esym_def(ENOMSG),
__esym_def(EIDRM),
__esym_def(EADDRINUSE),
+   __esym_def(EPROTO),
 };
 
 #define __esym_max  (sizeof(__esym_map) / sizeof(__esym_map[0]))


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


[Xenomai-git] Jorge Ramirez-Ortiz : lib/analogy: check for errors in the calibration file

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 522dc5d6cf8f58fee5f489f5c2736ff1ddb84703
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=522dc5d6cf8f58fee5f489f5c2736ff1ddb84703

Author: Jorge Ramirez-Ortiz j...@xenomai.org
Date:   Fri Aug  7 09:34:41 2015 -0400

lib/analogy: check for errors in the calibration file

Signed-off-by: Jorge Ramirez-Ortiz jorge.ramirez-or...@linaro.org

---

 lib/analogy/calibration.c |   29 +
 utils/analogy/insn_read.c |2 +-
 2 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/lib/analogy/calibration.c b/lib/analogy/calibration.c
index 14ca454..b50cb2f 100644
--- a/lib/analogy/calibration.c
+++ b/lib/analogy/calibration.c
@@ -30,6 +30,12 @@
 #include boilerplate/list.h
 #include calibration.h
 
+#define CHK(func, ...) 
\
+do {   
\
+   int rc = func(__VA_ARGS__); 
\
+   if (rc  0) 
\
+   return -1;  
\
+} while (0)
 
 #define ARRAY_LEN(a)  (sizeof(a) / sizeof((a)[0]))
 
@@ -212,12 +218,19 @@ int a4l_read_calibration_file(char *name, struct 
a4l_calibration_data *data)
if (d == NULL)
return -1;
 
-   read_str(data-driver_name, d, PLATFORM_STR, DRIVER_STR);
-   read_str(data-board_name, d, PLATFORM_STR, BOARD_STR);
+   CHK(read_str, data-driver_name, d, PLATFORM_STR, DRIVER_STR);
+   CHK(read_str, data-board_name, d, PLATFORM_STR, BOARD_STR);
 
for (k = 0; k  ARRAY_LEN(subdevice); k++) {
read_int(nb_elements, d, subdevice[k], -1, ELEMENTS_STR);
-   read_int(index, d, subdevice[k], -1, INDEX_STR);
+   if (nb_elements  0 ) {
+   /* AO is optional */
+   if (!strncmp(subdevice[k], AO_SUBD_STR, 
sizeof(AO_SUBD_STR)))
+break;
+   return -1;
+   }
+
+   CHK(read_int, index, d, subdevice[k], -1, INDEX_STR);
 
if (strncmp(subdevice[k], AI_SUBD_STR,
strlen(AI_SUBD_STR)) == 0) {
@@ -236,19 +249,19 @@ int a4l_read_calibration_file(char *name, struct 
a4l_calibration_data *data)
}
 
for (i = 0; i  nb_elements; i++) {
-   read_int(p-expansion, d, subdevice[k], i,
+   CHK(read_int, p-expansion, d, subdevice[k], i,
 EXPANSION_STR);
-   read_int(p-nb_coeff, d, subdevice[k], i,
+   CHK(read_int, p-nb_coeff, d, subdevice[k], i,
 NBCOEFF_STR);
-   read_int(p-channel, d, subdevice[k], i,
+   CHK(read_int, p-channel, d, subdevice[k], i,
 CHANNEL_STR);
-   read_int(p-range, d, subdevice[k], i,
+   CHK(read_int, p-range, d, subdevice[k], i,
 RANGE_STR);
 
p-coeff = malloc(p-nb_coeff * sizeof(double));
 
for (j = 0; j  p-nb_coeff; j++) {
-   read_dbl(p-coeff[j], d, subdevice[k], i,
+   CHK(read_dbl,p-coeff[j], d, subdevice[k], i,
 COEFF_STR, j);
}
 
diff --git a/utils/analogy/insn_read.c b/utils/analogy/insn_read.c
index 8d457ed..8aa0740 100644
--- a/utils/analogy/insn_read.c
+++ b/utils/analogy/insn_read.c
@@ -223,7 +223,7 @@ static int dump_calibrated(a4l_desc_t *dsc, unsigned char 
*buf, int size)
err = a4l_read_calibration_file(calibration_file, cal_info);
if (err  0) {
fprintf(stderr,
-   insn_read: failed to read /tmp/calibration.txt \n);
+   insn_read: error reading the calibration file \n);
goto out;
}
 


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


[Xenomai-git] Philippe Gerum : copperplate/semobj: add uninit cleanup helper

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: fa3092a14f97e729c6f8e0bc5608c87a1a063e6a
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=fa3092a14f97e729c6f8e0bc5608c87a1a063e6a

Author: Philippe Gerum r...@xenomai.org
Date:   Mon Aug 10 18:07:05 2015 +0200

copperplate/semobj: add uninit cleanup helper

This one does not run the object finalizer, assuming a strictly
passive object (no waiters yet).

---

 include/copperplate/semobj.h |2 ++
 lib/copperplate/semobj.c |   12 
 2 files changed, 14 insertions(+)

diff --git a/include/copperplate/semobj.h b/include/copperplate/semobj.h
index dd2e642..4d9e0a5 100644
--- a/include/copperplate/semobj.h
+++ b/include/copperplate/semobj.h
@@ -66,6 +66,8 @@ int semobj_init(struct semobj *smobj,
 
 int semobj_destroy(struct semobj *smobj);
 
+void semobj_uninit(struct semobj *smobj);
+
 int semobj_post(struct semobj *smobj);
 
 int semobj_broadcast(struct semobj *smobj);
diff --git a/lib/copperplate/semobj.c b/lib/copperplate/semobj.c
index d056a7b..a615678 100644
--- a/lib/copperplate/semobj.c
+++ b/lib/copperplate/semobj.c
@@ -73,6 +73,13 @@ int semobj_destroy(struct semobj *smobj)
return ret;
 }
 
+void semobj_uninit(struct semobj *smobj)
+{
+   int ret = __RT(sem_destroy(smobj-core.sem));
+   assert(ret == 0);
+   (void)ret;
+}
+
 int semobj_post(struct semobj *smobj)
 {
int ret;
@@ -217,6 +224,11 @@ int semobj_destroy(struct semobj *smobj)
return syncobj_destroy(smobj-core.sobj, syns);
 }
 
+void semobj_uninit(struct semobj *smobj)
+{
+   syncobj_uninit(smobj-core.sobj);
+}
+
 int semobj_post(struct semobj *smobj)
 {
struct syncstate syns;


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


[Xenomai-git] Philippe Gerum : alchemy/event: prevent double-free on error path

2015-08-15 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: 9e3cbdb1647d3d0cf552303f3c7960e2cc178ca8
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=9e3cbdb1647d3d0cf552303f3c7960e2cc178ca8

Author: Philippe Gerum r...@xenomai.org
Date:   Mon Aug 10 18:08:00 2015 +0200

alchemy/event: prevent double-free on error path

We don't want the finalizer to run for the underlying event object
when cleaning up upon error at creation. Call the uninit helper
instead.

---

 lib/alchemy/event.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/alchemy/event.c b/lib/alchemy/event.c
index 0f83376..dd260f5 100644
--- a/lib/alchemy/event.c
+++ b/lib/alchemy/event.c
@@ -215,7 +215,7 @@ int rt_event_create(RT_EVENT *event, const char *name,
 
if (syncluster_addobj(alchemy_event_table, evcb-name, evcb-cobj)) {
registry_destroy_file(evcb-fsobj);
-   eventobj_destroy(evcb-evobj);
+   eventobj_uninit(evcb-evobj);
xnfree(evcb);
ret = -EEXIST;
} else


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