Re: L4_Word_t vs. void*

Espen Skoglund <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
[Joshua Haberman]
> I notice that the L4 headers use L4_Word_t (and never void*) to
> refer to addresses.  Is there a reason why L4_Word_t is a better
> choice?  Should I avoid using void* in my own L4 programs?

> I imagine there are 32/64 bit issues here (and perhaps even
> 32-on-64) that I don't fully understand.  Can someone enlighten me?

Difficult to give one single good reason for this.  Much of it has
historic reasons.  It's also not so much a 32/64 bit issue as it is a
question about how we use the addresses.  For the most part, the
addresses are not really pointers to objects (as in C++ objects).
Describing them as void * can as such be misleading.  It is also
easier to use Word for calculating offsets, etc.

Just because we don't use void * much in the API specification does
not mean that you should necessarily try to avoid it in your own
programs.

	eSk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.