views:

11

answers:

0

I'm writing a xenomai applications which spawns a few threads:

rt_task_spawn(&fcThread, "fcThread", FC_THREAD_STACK, FC_THREAD_PRIO, 0, &run, (void*)(this))

Each thread is very simple and looks like this:

while (true)
{
   rt_queue_read(pThis->pMsgQueue, (void*)(&msg), sizeof(mystruct), TM_INFINITE)
…

}

They are simple threads but I'd like to know hom much memory each thread uses and (more important) the CPU usage for each thread. Are there xenomai tools available or shall I write my own code? And How?