> > Third, if u have a look at "conventional" drivers, there's no or very > > less need of libc functions. > > That's because they're not allowed to be used from there. ;-) I would add a > network server to my Linux device drivers for debugging or controlling if I'd > be allowed by Linux. But I'm not, so I don't use all the libc calls for > networking. I don't have a real idea of what I'd use if everything was > allowed, but I think it would be quite a lot. >
I don't think libc calls are very useful in drivers. libc basically offers stream based I/O which is useless for drivers as they generally work with packets, memory management which is too crude (drivers need to be able to ask for pinneable memory, memory in certain physical address range for DMA, etc...), string functions which are useless for drivers (drivers don't interpret data, they mostly pass data around without looking at it), memcpy etc which is somewhat useful but very easy to implement in a small library, math functions which are mostly useless as drivers don't need much more then very basic arithmetics. Drivers generally don't offer posix interfaces because the hardware they abstract is very far from posix semantics. p2.
signature.asc
Description: Digital signature
_______________________________________________ L4-hurd mailing list [email protected] http://lists.gnu.org/mailman/listinfo/l4-hurd
