All of lore.kernel.org
 help / color / mirror / Atom feed
From: 嵌入式工程师 <ericvic@163.com>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>,
	"xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: [Xenomai] imx6q xenomai ipipe-3.0-imx6q
Date: Tue, 1 Apr 2014 10:35:02 +0800 (CST)	[thread overview]
Message-ID: <36553bb2.3800.1451b23ccfc.Coremail.ericvic@163.com> (raw)

Hello Gilles ,this is my test about xenomai ,this can also effect the my program  and the latency test
,thanks 。


== Sampling period: 1000 us
== Test mode: in-kernel periodic task
== All results in microseconds
warming up...
RTT|  00:00:01  (in-kernel periodic task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      0.452|     17.221|  16637.492|      16|     0|      0.452|  16637.492
RTD|      0.431|     17.253|  16641.974|      32|     0|      0.431|  16641.974
RTD|      0.459|     17.233|  16639.224|      48|     0|      0.431|  16641.974
RTD|      0.439|     17.231|  16638.423|      64|     0|      0.431|  16641.974
RTD|      0.454|     17.232|  16638.489|      80|     0|      0.431|  16641.974
RTD|      0.453|     17.223|  16638.569|      96|     0|      0.431|  16641.974
RTD|      0.440|     17.227|  16638.612|     112|     0|      0.431|  16641.974
RTD|      0.458|     17.224|  16637.822|     128|     0|      0.431|  16641.974
RTD|      0.407|     17.269|  16639.417|     144|     0|      0.407|  16641.974
RTD|      0.432|     17.237|  16638.607|     160|     0|      0.407|  16641.974
RTD|      0.442|     17.278|  16638.695|     176|     0|      0.407|  16641.974
RTD|      0.437|     17.226|  16639.202|     192|     0|      0.407|  16641.974
RTD|      0.427|     17.232|  16637.467|     208|     0|      0.407|  16641.974
RTD|      0.454|     17.280|  16638.828|     224|     0|      0.407|  16641.974
RTD|      0.421|     17.241|  16637.866|     240|     0|      0.407|  16641.974
RTD|      0.398|     17.236|  16639.530|     256|     0|      0.398|  16641.974
RTD|      0.431|     17.252|  16637.032|     272|     0|      0.398|  16641.974
RTD|      0.446|     17.256|  16638.845|     288|     0|      0.398|  16641.974
RTD|      0.446|     17.253|  16638.981|     304|     0|      0.398|  16641.974
RTD|      0.433|     17.243|  16637.329|     320|     0|      0.398|  16641.974
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|      0.398|     17.242|  16641.974|     320|     0|    00:00:21/00:00:21
-sh-2.05b# 




#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>


#include <native/task.h>
#include <native/timer.h>


RT_TASK demo_task;


/* NOTE: error handling omitted. */


void demo(void *arg)
{
        RTIME now, previous;


        /*
         * Arguments: &task (NULL=self),
         *            start time,
         *            period (here: 1 s)
         */
        rt_task_set_periodic(NULL, TM_NOW, 1000000000);
        previous = rt_timer_read();
long long i,j,k;
        while (1) {
                rt_task_wait_period(NULL);
                now = rt_timer_read();
 for(i=1;i<1000;i++)
for(j=1;j<i;j++)
k=i*j;
                /*
                 * NOTE: printf may have unexpected impact on the timing of
                 *       your program. It is used here in the critical loop
                 *       only for demonstration purposes.
                 */
                printf("Time since last turn: %ld.%06ld ms\n",
                       (long)(now - previous) / 1000000,
                       (long)(now - previous) % 1000000);
                       previous = now;
        }
}


void catch_signal(int sig)
{
}


int main(int argc, char* argv[])
{
        signal(SIGTERM, catch_signal);
        signal(SIGINT, catch_signal);


        /* Avoids memory swapping for this program */
        mlockall(MCL_CURRENT|MCL_FUTURE);


        /*
         * Arguments: &task,
         *            name,
         *            stack size (0=default),
         *            priority,
         *            mode (FPU, start suspended, ...)
         */
        rt_task_create(&demo_task, "trivial", 0, 99, 0);


        /*
         * Arguments: &task,
         *            task function,
         *            function argument
         */
        rt_task_start(&demo_task, &demo, NULL);


        pause();


        rt_task_delete(&demo_task);
}

             reply	other threads:[~2014-04-01  2:35 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01  2:35 嵌入式工程师 [this message]
2014-04-01 10:49 ` [Xenomai] imx6q xenomai ipipe-3.0-imx6q Gilles Chanteperdrix
2014-04-02  0:53   ` 嵌入式工程师
2014-04-02  7:28     ` Gilles Chanteperdrix
2014-04-03 10:25       ` 嵌入式工程师
  -- strict thread matches above, loose matches on Subject: below --
2014-04-18 10:28 嵌入式工程师
2014-04-18 11:47 ` Gilles Chanteperdrix
2014-04-20  5:06   ` eric
2014-04-20  9:03     ` Gilles Chanteperdrix
2014-04-20  9:23       ` Gilles Chanteperdrix
2014-04-20 10:46         ` eric
2014-04-23  4:40           ` eric
2014-04-23 12:24             ` Gilles Chanteperdrix
2014-04-17  8:13 嵌入式工程师
2014-04-17  7:58 嵌入式工程师
2014-04-17  7:43 嵌入式工程师
2014-04-17 11:42 ` Gilles Chanteperdrix
2014-03-26 11:36 嵌入式工程师
2014-03-26 11:50 ` Gilles Chanteperdrix
2014-03-26 13:31   ` 嵌入式工程师
2014-03-26 13:34     ` Gilles Chanteperdrix
2014-03-26 14:29       ` 嵌入式工程师
2014-03-26 23:09         ` Gilles Chanteperdrix
2014-03-27  1:41           ` 嵌入式工程师
2014-03-27  5:24           ` 嵌入式工程师
2014-03-27 12:27             ` Gilles Chanteperdrix
2014-03-28  5:02               ` 嵌入式工程师
2014-03-28 17:35                 ` Gilles Chanteperdrix
2014-03-29  5:54                   ` 嵌入式工程师
2014-03-28  8:19               ` 嵌入式工程师
2014-03-28 17:37                 ` Gilles Chanteperdrix
2014-03-28  9:08               ` 嵌入式工程师
2014-03-28 17:38                 ` Gilles Chanteperdrix
2014-03-29  6:21                   ` 嵌入式工程师
2014-03-29 13:51                     ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36553bb2.3800.1451b23ccfc.Coremail.ericvic@163.com \
    --to=ericvic@163.com \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.