Thread (5 messages) 5 messages, 3 authors, 2013-06-13

Re: [Suggestion] arch/*/include/asm/bitops.h: about __set_bit() API.

From: Tony Luck <hidden>
Date: 2013-06-10 22:26:30
Also in: linux-alpha, lkml

On Sat, Jun 8, 2013 at 3:08 AM, Chen Gang [off-list ref] wrote:
using 'unsigned int *', implicitly:
  ./ia64/include/asm/bitops.h:63:__set_bit (int nr, volatile void *addr)
There is some downside on ia64 to your suggestion.  If "addr" is properly
aligned for an "int", but misaligned for a long ... i.e. addr%8 == 4, then I'll
take an unaligned reference trap if I work with long* where the current code
working with int* does not.

Now perhaps all the callers do guarantee long* alignment?  But I don't know.

Apart from uniformity, there doesn't see to be any upside to changing this.

-Tony Luck
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help