[openbeos] Re: driver dprintf question

Selon Allen Brunson <brunsona@xxxxxxxxxxx>:

> Alexander G.M. Smith wrote:
> > There's also quad word, %qd, which works in UserLand x86 for 64
> > bit numbers, but not in Kernel land.
> 
> Don't forget the Intel versus PPC distinction as well!  I've never written
> kernel-space code, but in userland x86, "%lld" or "%Ld" both work equally
> well, but on PPC you can only use "%Ld".  No doubt due to differences
> between gcc and the Metrowerks compiler.
> 
> It seems odd to me that the kernel-land dprintf() sounds so limited.  Why no
> floating point?  Couldn't they just transplant the sprintf() code from the
> gcc runtime library into the kernel?  Is it a licensing issue?
> 

Because kernel land isn't as comfy as userland.
I guess they just used a stripped down printf and never bothered 
to update it.
Just to say in Linux for ex, floating point is strictly forbidden 
in the kernel. (well maybe this has changed since then).
anyway floating points are time consuming ops that should not be 
used in kernel without thinking about it.

François.

Other related posts: