All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clark Williams <williams@redhat.com>
To: Michael Haberler <mail17@mah.priv.at>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: RT_PREEMPT autodetection from user program
Date: Mon, 21 Jan 2013 09:37:59 -0600	[thread overview]
Message-ID: <20130121093759.045119c8@redhat.com> (raw)
In-Reply-To: <97041258-E312-4163-96B2-9077EED68E0B@mah.priv.at>

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

On Sun, 20 Jan 2013 01:49:59 +0100
Michael Haberler <mail17@mah.priv.at> wrote:

> Hi,
> 
> I need to autodetect the RT kernel for an application which runs under RTAI, Xenomai, RT_PREEMPT and vanilla kernels. 
> 
> To support a unified binary, I need to runtime detect the RT OS - what are my best options for RT_PREEMPT? from https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO#Checking_the_Kernel I gather the single method:
> 
> parsing 'ps' output for IRQ handlers being kthreads, i.e. for '[IRQ' or '[irq'
> 
> any chance of doing better than that, or parsing of utsname.release for "-rt"?  A false positive on a vanilla kernel could be a safety hazard.
> 
>

A PREEMPT_RT kernel creates /sys/kernel/realtime when it boots. You
can just check for the existence of that file.

Clark

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

      parent reply	other threads:[~2013-01-21 15:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-20  0:49 RT_PREEMPT autodetection from user program Michael Haberler
2013-01-20  1:56 ` Sven-Thorsten Dietrich
2013-01-20  9:49 ` Stanislav Meduna
2013-01-20 12:43   ` Michael Mueller
2013-01-21 15:37 ` Clark Williams [this message]

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=20130121093759.045119c8@redhat.com \
    --to=williams@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mail17@mah.priv.at \
    /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.