Philippe Gerum wrote:
 > Cedric Herreman wrote:
 > > OK,
 > > 
 > > I made an extra math module, copying some of the source code from newlib 
 > > for the functions i needed. It works.
 > > 
 > > Another question : if i create an application (in stead of kernel 
 > > module) that starts a real time thread. Can i then use math functions 
 > > inside the real time running part ?
 > > 
 > > In the latency example, the sqrt function is used for displaying the 
 > > results of the latency test.  This is outside the real time task. Is it 
 > > possible to use this call in the real time function ? Or any other 
 > > library function (that is not performing system calls) ?
 > >
 > 
 > Yes. RT threads in user-space have their own FPU context managed by Xenomai.

As for math functions implemented in libm, they may be called from
real-time threads, but if we want to be precise, we can not guarantee
their worst case behaviour, you have to do a mathematical analysis of
their implementation for that (sqrt is probably implemented in hardware,
so you have to read intel spec to know if the max cycles count is known,
but it would be strange if it was not).

-- 


                                            Gilles Chanteperdrix.

Reply via email to