Re: i386 and x86-64 bitops function prototypes differ



Stephane Eranian wrote:
Hello,

I ran into compiler warnings with the perfmon code when I tried
using test() and __set_bit() on i386.

For some reason, the i386 bitops functions use unsigned long * for
the address whereas x86-64/ia64 use void *.

I do not quite understand why such difference?
Is this just for historical reasons?

Thanks.


Arguably void * is the right thing for a littleendian architecture. For bigendian architectures it unfortunately matters what the chunk size is, regardless of if the chunks are numbered in bigendian (reverse) or littleendian (forward) order.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Size of 2.6.20 task_struct on x86_64 machines
    ... size of various struct in the kernel. ... Is there a reason there ... Most architectures' bitops functions take unsigned long * so if anyone is ...
    (Linux-Kernel)
  • Re: Is anyone out there?
    ... snip large chunk ... That is exactly the reason I handed my TA's Certificate back. ... to be a feasible proposition in a voluntary organisation and I, for one, ...
    (uk.rec.scouting)
  • Re: One OR MORE of source and destination addresses?
    ... yes (note that I'm certainly no expert on this chunk of ... > code) My reason for saying yes is: ... > the top of the file states that the function returns 1 on failure, ... my reason for thinking "yes" was the same. ...
    (freebsd-hackers)
  • Re: One OR MORE of source and destination addresses?
    ... yes (note that I'm certainly no expert on this chunk of ... > code) My reason for saying yes is: ... > the top of the file states that the function returns 1 on failure, ... my reason for thinking "yes" was the same. ...
    (freebsd-questions)
  • Re: Writing transitions
    ... be a more than adequate political intriguer, and I've given him a reason ... to brush up his knowledge. ... big chunk of events is that one of the villains returns and he has to ...
    (rec.arts.sf.composition)