[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Including a C Library in a Mirage Xen Kernel



On Tue, Dec 17, 2013 at 05:25:20PM +0000, Anil Madhavapeddy wrote:
> As part of Gabor Pali's work to port Mirage to a
> FreeBSD kernel module, he showed that the libkern present in FreeBSD gives
> us a pretty good printf implementation (caveat: no floating point printing).

Actually, there is support for printing floating-point values in the
referenced kernel module backend.  I used fixed-point "floats" that may be
rendered as a string, thus the floating-point format specifiers will work
with them.

This is done in the adapted OCaml run-time [1] which is then passed to the
kernel's printf() function as a string [2], so it does not expect from kernel
library to format any string.

[1] 
https://github.com/pgj/mirage-platform/blob/master/kfreebsd/runtime/ocaml/floats.c#L160
[2] 
https://github.com/pgj/mirage-platform/blob/master/kfreebsd/runtime/ocaml/io.c#L196

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.