All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jeff Weber <jwamsc@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rtdm_printk
Date: Thu, 10 Mar 2011 14:03:31 +0100	[thread overview]
Message-ID: <4D78CC23.5030302@domain.hid> (raw)
In-Reply-To: <4D787DB7.2020503@domain.hid>

Gilles Chanteperdrix wrote:
> Jeff Weber wrote:
>> When writing a RTDM kernel module driver, when must rtdm_printk() be used
>> instead of printk() ?
> 
> If RTDM was, one day, ported over something else than a Linux
> kernel-space based solution (for instance, over a port of Xenomai
> without Linux, or in Linux user-space), then you would not have to
> change your driver codeto have it compile over that new port.
> 
> Until then, printk and rtdm_printk are identical.
> 
> Note that the first paragraph is something very hypothetical, because in
> an RTDM driver, you generally have some other Linux kernel-space
> specific code, such as for instance the registration as a PCI driver,
> though the necessary parts of the Linux API could be implemented for
> that hypothetical port. But in that case, so could printk.
> 
> So...

I guess the real reason for rtdm_printk is that at some point in the
past (probably before the Adeos era), printk was not safe to be called
from the real-time domain. In that case, rtdm_printk would be safe to be
called from the real-time domain. So, the answer is that you should use
rtdm_printk if you are calling from a Xenomai domain interrupt handler,
or from the context of a thread running in primary mode.

-- 
					    Gilles.


  reply	other threads:[~2011-03-10 13:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-10  4:29 [Xenomai-help] rtdm_printk Jeff Weber
2011-03-10  7:28 ` Gilles Chanteperdrix
2011-03-10 13:03   ` Gilles Chanteperdrix [this message]
2011-03-10 18:15     ` Jeff Weber
2011-03-10 18:27       ` Gilles Chanteperdrix
2011-03-10 18:37         ` Jeff Weber
2011-03-10 18:42           ` 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=4D78CC23.5030302@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=jwamsc@domain.hid \
    --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.