From mboxrd@z Thu Jan 1 00:00:00 1970 References: <857546.30206.qm@domain.hid> <490B32EF.8050503@domain.hid> Date: Fri, 31 Oct 2008 16:47:33 +0000 (GMT) From: Gabriele Moabiti MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-952731863-1225471653=:30247" Message-ID: <327543.30247.qm@domain.hid> Subject: Re: [Xenomai-help] floating point (int 16) exception List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai@xenomai.org --0-952731863-1225471653=:30247 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0A=0A>No, simply doing an fnclex will not do the trick.=0A>=0A>If you do n= ot know the details of Xenomai and Linux FPU handling on x86,=0A>I advise y= ou to let xenomai handle the fault, it does it without=0A>switching to seco= ndary mode, so, you can use it. I do not want to=0A>explain you how it work= s because it is rather hairy, so, the only way to=0A>understand, if you rea= lly want to, is to read the xenomai and linux=0A>relevant sources.=0A=0AI n= eed to manage exceptions in a different way of the x86 default so I have to= unmask fpu exceptions. I have read and follow how it works but in xenomai = fpu exceptions invoke a switch to linux... =0A=0Aint xnpod_trap_fault(xnarc= h_fltinfo_t *fltinfo)=0A{=0A ...=0A if (xnpod_shadow_p()) {=0A = ...=0A xnshadow_relax(xnarch_fault_notify(fltinfo));=0A }=0A = return 0;=0A}=0A=0Aso there is not in the source code an example on how to = trap exception and remain into real time task...=0A=0A=0A Unisciti all= a community di Io fotografo e video, il nuovo corso di fotografia di Gazzet= ta dello sport:=0Ahttp://www.flickr.com/groups/iofotografoevideo --0-952731863-1225471653=:30247 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

>No, simply doing an fnclex will not do the trick.
>=
>If you do not know the details of Xenomai and Linux FPU handling on= x86,
>I advise you to let xenomai handle the fault, it does it witho= ut
>switching to secondary mode, so, you can use it. I do not want to=
>explain you how it works because it is rather hairy, so, the only w= ay to
>understand, if you really want to, is to read the xenomai and = linux
>relevant sources.

I need to manage exceptions in a diff= erent way of the x86 default so I have to unmask fpu exceptions. I have rea= d and follow how it works but in xenomai fpu exceptions invoke a switch to linux...

int xnpod_trap_fault(xnarch_fltinfo_t *fltinfo)
{
&= nbsp;   ...
    if (xnpod_shadow_p()) {
&nbs= p;       ...
        x= nshadow_relax(xnarch_fault_notify(fltinfo));
    }
&nb= sp;   return 0;
}

so there is not in the source code an= example on how to trap exception and remain into real time task...

=


=0A=0A=0A=0A
Scopri la community di Io fotografo e video
=0AIl nuovo corso di Gazzetta dello sport per= diventare veri fotografi!
--0-952731863-1225471653=:30247--