tech-userlevel archive

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

Re: qsort_r



On Mon, Dec 09, 2013 at 22:20:47 +1100, matthew green wrote:

> > On Mon, 09 Dec 2013, Mouse wrote:
> > > I actually don't see anything that promises that a pointer to a 
> > > function type may be converted to a pointer to void, nor back 
> > > again (except, in each direction, when the original pointer is 
> > > nil), much less promising anything about the results if it is 
> > > done.  But I haven't read over the whole thing recently enough 
> > > to be sure there isn't such a promise hiding somewhere.
> > 
> > Sorry, I did not express myself clearly enough.  C does not 
> > promise that function pointers can be converted to or from void* 
> > pointers, but I believe that all existing NetBSD implementations 
> > do allow such conversions.
> 
> if you include the powerpc64 port in the list of existing
> netbsd implementations, then we do have one.. or at least
> sort of.  i don't recall the details, but they're not just
> simple pointers you jump to, and the descriptors take up
> more space than a normal pointer.

Itanium has fat function pointers - they point to a struct of code
address plus gp register value.

-uwe


Home | Main Index | Thread Index | Old Index