All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Webb <jeff.webb@domain.hid>
To: Xenomai help <xenomai@xenomai.org>
Subject: [Xenomai-help] invalid use of FPU in Xenomai context
Date: Thu, 14 Sep 2006 17:47:07 -0500	[thread overview]
Message-ID: <4509DBEB.7020707@domain.hid> (raw)

I made some more progress in porting my RTLinux application, but now I'm spinning my wheels trying to track down the source of the following error:

  "invalid use of FPU in Xenomai context at ..."

I am doing floating point calculations inside a real-time POSIX thread in kernel-space.  I am puzzled because I can create a simple test program that uses floating point operations in a real-time thread without any errors.  I create the task with something like this:

      pthread_attr_init(&attr);
      pthread_attr_setfp_np(&attr, 1);
      result = pthread_create(&fptest_task, &attr, &fptest_routine, NULL);

In fact, it seems that the fp attribute is already 1 by default, because I get no floating point errors if I leave out the pthread_attr_setfp_np line.  I do get an error if I do this:

  pthread_attr_setfp_np(&attr, 0);

I am doing the same thing in my much more complicated real-time application.  In fact, I can even insert a loop with some floating-point code at the beginning of my thread, and it works fine.  The problem is that something in my application code is triggering the "invalid use of FPU" error.

Does anyone have any ideas of what could trigger this besides not setting the fp attribute for the thread?

Thanks,

Jeff


             reply	other threads:[~2006-09-14 22:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-14 22:47 Jeff Webb [this message]
2006-09-15  8:25 ` [Xenomai-help] invalid use of FPU in Xenomai context Philippe Gerum
2006-09-15 14:39   ` Jeff Webb
2006-09-15  9:12 ` Gilles Chanteperdrix
2006-09-15 14:43   ` Jeff Webb
     [not found]     ` <17674.48814.824895.814925@domain.hid>
2006-09-15 20:33       ` Jeff Webb
     [not found] <450B2BE1.1050105@domain.hid>
2006-09-16  4:38 ` Fw: [Fwd: Re: [Xenomai-help] invalid use of FPU in Xenomai context] Jeff Webb
2006-09-18 20:40   ` [Xenomai-help] invalid use of FPU in Xenomai context Jeff Webb
2006-09-18 21:23     ` Philippe Gerum
2006-10-25 20:00       ` Jeff Webb
2006-10-25 20:24         ` Jan Kiszka
2006-10-25 20:43           ` Jeff Webb
2006-10-25 23:37           ` Jeff Webb
2006-10-27 16:30             ` Jeff Webb

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=4509DBEB.7020707@domain.hid \
    --to=jeff.webb@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.