[Xenomai-core] [pull request] rtdm: Fix copypaste mistake in instrumentation

2009-11-15 Thread Jan Kiszka
The following changes since commit cd3465f1862a4aa29e488a3876097d9e425ef907:
  Philippe Gerum (1):
nios2: upgrade I-pipe support to 2.6.30-nios2-1.1-00

are available in the git repository at:

  git://git.xenomai.org/xenomai-jki for-upstream

Jan Kiszka (1):
  rtdm: Fix copypaste mistake in instrumentation

 ksrc/skins/rtdm/core.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)



signature.asc
Description: OpenPGP digital signature
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


Re: [Xenomai-core] [PATCH v3 9/9] nucleus: Include all heaps in statistics

2009-11-15 Thread Philippe Gerum
On Wed, 2009-11-11 at 13:59 +0100, Jan Kiszka wrote:
 Jan Kiszka wrote:
  Philippe Gerum wrote:
  On Tue, 2009-10-20 at 13:37 +0200, Jan Kiszka wrote:
  This extends /proc/xenomai/heap with statistics about all currently used
  heaps. It takes care to flush nklock while iterating of this potentially
  long list.
 
  Signed-off-by: Jan Kiszka jan.kis...@siemens.com
  ---
 
   include/nucleus/heap.h|   12 +++-
   ksrc/drivers/ipc/iddp.c   |3 +
   ksrc/drivers/ipc/xddp.c   |6 ++
   ksrc/nucleus/heap.c   |  131 
  -
   ksrc/nucleus/module.c |2 -
   ksrc/nucleus/pod.c|5 +-
   ksrc/nucleus/shadow.c |5 +-
   ksrc/skins/native/heap.c  |6 +-
   ksrc/skins/native/pipe.c  |4 +
   ksrc/skins/native/queue.c |6 +-
   ksrc/skins/posix/shm.c|4 +
   ksrc/skins/psos+/rn.c |6 +-
   ksrc/skins/rtai/shm.c |7 ++
   ksrc/skins/vrtx/heap.c|6 +-
   ksrc/skins/vrtx/syscall.c |3 +
   15 files changed, 169 insertions(+), 37 deletions(-)
 
  diff --git a/include/nucleus/heap.h b/include/nucleus/heap.h
  index 44db738..f653cd7 100644
  --- a/include/nucleus/heap.h
  +++ b/include/nucleus/heap.h
  @@ -115,6 +115,10 @@ typedef struct xnheap {
 
XNARCH_DECL_DISPLAY_CONTEXT();
 
  + xnholder_t stat_link;   /* Link in heapq */
  +
  + char name[48];
  s,48,XNOBJECT_NAME_LEN
  
  OK, but XNOBJECT_NAME_LEN+16 (due to class prefixes and additional
  information like the minor ID).
  
  +
   } xnheap_t;
 
   extern xnheap_t kheap;
  @@ -202,7 +206,8 @@ void xnheap_cleanup_proc(void);
 
   int xnheap_init_mapped(xnheap_t *heap,
   u_long heapsize,
  -int memflags);
  +int memflags,
  +const char *name, ...);
 
  The va_list is handy, but this breaks the common pattern used throughout
  the rest of the nucleus, based on passing pre-formatted labels. So
  either we make all creation calls use va_lists (but xnthread would need
  more work), or we make xnheap_init_mapped use the not-so-handy current
  form.
 
  Actually, providing xnheap_set_name() and a name parameter/va_list to
  xnheap_init* is one too many, this clutters an inner interface
  uselessly. The latter should go away, assuming that anon heaps may still
  exist.
  
  If we want to print all heaps, we should at least set a name indicating
  their class. And therefore we need to pass a descriptive name along with
  /every/ heap initialization. Forcing the majority of xnheap_init users
  to additionally issue xnheap_set_name is the cluttering a wanted to
  avoid. Only a minority needs this split-up, and therefore you see both
  interfaces in my patch.
  
   void xnheap_destroy_mapped(xnheap_t *heap,
   void (*release)(struct xnheap *heap),
  @@ -224,7 +229,10 @@ void xnheap_destroy_mapped(xnheap_t *heap,
   int xnheap_init(xnheap_t *heap,
void *heapaddr,
u_long heapsize,
  - u_long pagesize);
  + u_long pagesize,
  + const char *name, ...);
  +
  +void xnheap_set_name(xnheap_t *heap, const char *name, ...);
 
   void xnheap_destroy(xnheap_t *heap,
void (*flushfn)(xnheap_t *heap,
  diff --git a/ksrc/drivers/ipc/iddp.c b/ksrc/drivers/ipc/iddp.c
  index a407946..b6382f1 100644
  --- a/ksrc/drivers/ipc/iddp.c
  +++ b/ksrc/drivers/ipc/iddp.c
  @@ -559,7 +559,8 @@ static int __iddp_bind_socket(struct rtipc_private 
  *priv,
}
 
ret = xnheap_init(sk-privpool,
  -   poolmem, poolsz, XNHEAP_PAGE_SIZE);
  +   poolmem, poolsz, XNHEAP_PAGE_SIZE,
  +   ippd: %d, port);
if (ret) {
xnarch_free_host_mem(poolmem, poolsz);
goto fail;
  diff --git a/ksrc/drivers/ipc/xddp.c b/ksrc/drivers/ipc/xddp.c
  index f62147a..a5dafef 100644
  --- a/ksrc/drivers/ipc/xddp.c
  +++ b/ksrc/drivers/ipc/xddp.c
  @@ -703,7 +703,7 @@ static int __xddp_bind_socket(struct rtipc_private 
  *priv,
}
 
ret = xnheap_init(sk-privpool,
  -   poolmem, poolsz, XNHEAP_PAGE_SIZE);
  +   poolmem, poolsz, XNHEAP_PAGE_SIZE, );
if (ret) {
xnarch_free_host_mem(poolmem, poolsz);
goto fail;
  @@ -746,6 +746,10 @@ static int __xddp_bind_socket(struct rtipc_private 
  *priv,
sk-minor = ret;
sa-sipc_port = ret;
sk-name = *sa;
  +
  + if (poolsz  0)
  + xnheap_set_name(sk-bufpool, xddp: %d, sa-sipc_port);
  +
/* Set default destination if unset at binding time. */
if (sk-peer.sipc_port  0)
sk-peer = *sa;
  diff --git a/ksrc/nucleus/heap.c b/ksrc/nucleus/heap.c
  index 96c46f8..793d1c5 100644
  --- 

[Xenomai-core] Replace bind.h with a convenience library.

2009-11-15 Thread Gilles Chanteperdrix
Hi,

in preparation for adding more code common to all skins (signals
handling), I split bind.h into three files, which are compiled as a
convenience library linked to every skin library.

I have pushed this first modification for review, you can see the
changes here:
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=05a32ee49ceedddc44024c2fc2f6125fdfe344b9

You may find the patch on the xenomai-git mailing list, if you want to
comment it inline.

Regards.

-- 
Gilles.

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core