All of lore.kernel.org
 help / color / mirror / Atom feed
From: ayaida marwane <ayaida_marwane@yahoo.fr>
To: xenomai@xenomai.org
Subject: RTDM Printk do not work on rtdm_timer_handler_t
Date: Mon, 18 May 2020 11:27:31 +0200	[thread overview]
Message-ID: <D5DEC4F7-7609-4B43-9DF7-BEBFEEFB1AC1@yahoo.fr> (raw)
In-Reply-To: D5DEC4F7-7609-4B43-9DF7-BEBFEEFB1AC1.ref@yahoo.fr

Dear all,

I have tried this code :

————————————————————

#include <rtdm/driver.h>

static int periode_us = 1000;
module_param(periode_us, int, 0644);

static void timer_task(rtdm_timer_t *);
static rtdm_timer_t rtimer;

static int __init init_oscillateur (void)
{
        int err;

        rtdm_printk(KERN_INFO "%s.%s() : Initialisation\n", THIS_MODULE->name, __FUNCTION__);

        if ((err = rtdm_timer_init(& rtimer, timer_task, "Timer_Task")) != 0) {
                return err;
        }

        if ((err = rtdm_timer_start(& rtimer, periode_us*1000, periode_us*1000, RTDM_TIMERMODE_RELATIVE)) != 0) {
                rtdm_timer_destroy(& rtimer);
                return err;
        }

        return 0;
}

static void __exit exit_oscillateur (void)
{
        rtdm_timer_stop(& rtimer);
        rtdm_timer_destroy(& rtimer);
        rtdm_printk(KERN_INFO "%s.%s() : Exit\n", THIS_MODULE->name, __FUNCTION__);
}

static void timer_task(rtdm_timer_t * unused)
{
        rtdm_printk(KERN_INFO "%s.%s() : Appel Timer\n", THIS_MODULE->name, __FUNCTION__);
}

module_init(init_oscillateur);
module_exit(exit_oscillateur);
MODULE_LICENSE("GPL");


————————————————————

However, when I execute the code, we have only :

[ 6696.615556] oscillateur_gpio_rtdm.init_oscillateur() : Initialisation
[ 6705.148129] oscillateur_gpio_rtdm.exit_oscillateur() : Exit

So, why the rtdm_printk in the timer_task is never called?

Thanks for your help.

BR,
Marwane.




       reply	other threads:[~2020-05-18  9:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <D5DEC4F7-7609-4B43-9DF7-BEBFEEFB1AC1.ref@yahoo.fr>
2020-05-18  9:27 ` ayaida marwane [this message]
2020-05-18 10:47   ` RTDM Printk do not work on rtdm_timer_handler_t Jan Kiszka
2020-05-18 10:58     ` ayaida marwane
2020-06-08 10:13       ` ayaida marwane
2020-06-12 16:14         ` Jan Kiszka

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=D5DEC4F7-7609-4B43-9DF7-BEBFEEFB1AC1@yahoo.fr \
    --to=ayaida_marwane@yahoo.fr \
    --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.