On Mon, Jul 31, 2000 at 01:32:33PM +0200, [EMAIL PROTECTED] wrote:
> > My question is a silly one : how to do rt_printk() of gethrtime() return
> > value. gethrtime() returns 64-bit signed integer (a long long int).
> > I already tried %q (quad int), %L, and %ll but they won't work.
> 
> No more than two months ago we discussed this topic
> on the list. Check archive.
> 
> The answer is: no longlong capability of printk() because
> it would require 64 bit division. However your processor has
> 32 bit arithmetic only and no math library linked with the kernel.
> 
> Print the time in hex:
> XXXXprint("%.8x%.8x", (long)((time>>32)&0xffffffff), (long)(time&0xffffffff));
> 


A vsprintf() that handles %f and %lld would be a good candidate
for a kernel module C library.  It is pretty clear that a patch
to the main kernel would not be accepted -- there isn't even a
global macro to do long long division because Linus wants to
remind everyone that using long long is crufty and bogus on the
i386.



dave...

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to