[parisc-linux] Some PA-RISC 2.0 Gotchas

Stan Sieler sieler@allegro.com
Fri, 11 Feb 2000 09:52:43 -0800 (PST)


Re: 

> - In 2.0, function pointers are not addresses to functions, but are
> addresses to data strcutures
> called "function descriptors". So, if assembly code gets passed a pointer to
> a function, it will have
> to remember which slot in the "function descriptor" the actual function
> pointer resides.

They're pointers to data on HP-UX 10.20 as well.
 
> - There are some places in the kernel where the implicit assumption that
> longs == ints will break!

:)

My pet peeve...

Code should almost *never* use "short", "int", or "long" ... 
but instead, "int32" and "int64" (or whatever) should be used.  

I've lost track of the number of bugs I've seen caused by this.  
(Ok, one exception...if you're calling a system function documented as 
using "int" or "long", then you can declare variables of those type 
... but be very careful using them, and file a bug report with the vendor :)

-- 
Stan Sieler                                           sieler@allegro.com
www.allegro.com/sieler/wanted/index.html          www.allegro.com/sieler