All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Steven Seeger <steve@domain.hid>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] no-brainer issue found, but not solved
Date: Tue, 21 Feb 2006 18:57:02 +0100	[thread overview]
Message-ID: <43FB546E.5090802@domain.hid> (raw)
In-Reply-To: <C020900D.24A8%steve@domain.hid>

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

Steven Seeger wrote:
> I have found what seems to cause my problem.
> 
> I have two threads, t1 and t2.
> 
> t1 has a priority level of 30, and t2 has a priority level of 5. I am using
> the native skin, so t1 has the higher priority.
> 
> t2 is flashing an LED on my board every 40 ms, and t1 does nothing until I
> hit a key on the keyboard. When t1 activates, it does for(i=0; i<100000000;
> i++) which locks up my board for about 3 seconds. During this time, I expect
> my LED to stop flashing. However, the LED will flash a few times just once,
> at a rate of about 1 second. (Coincidentally, 1 second is the timing of
> another unrelated thread in the system.)
> 
> At the start of my t1 thread, I use syslog (a system call) to log that the
> thread is created. This call is made once before the thread goes into its
> loop, waiting for a global variable to be set otherwise just calling
> rt_task_wait_period(). If I comment out my call to syslog, which again I
> state is NOT in the thread loop, this behavior goes away. It seems that once
> a syscall is made in a shadow thread, xenomai fails to have it behave in a
> true hard realtime fashion. It's as if the thread stays relaxed.

It does stay relaxed until the next blocking RT function is invoked.
When unsure if this happens (I am from your description, maybe you
should rather post a code snippet), try rt_task_set_mode(0, T_PRIMARY,
NULL) before entering the loop.

> 
> Does this shed any light on the issue I have?
> 
> Steven
> 
> 

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-02-21 17:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-21 17:38 [Xenomai-help] no-brainer issue found, but not solved Steven Seeger
2006-02-21 17:57 ` Jan Kiszka [this message]
2006-02-21 18:15   ` Steven Seeger
2006-02-21 18:36     ` Jan Kiszka
2006-02-21 21:20       ` Jeroen Van den Keybus
2006-02-22 14:21         ` Steven Seeger
2006-02-22 15:00           ` Jan Kiszka
2006-02-24  9:01       ` Philippe Gerum
2006-02-24 14:00         ` Steven Seeger

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=43FB546E.5090802@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=steve@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.