Re: [git pull] ia64 changes

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

 




On Sat, 26 Sep 2009, Linus Torvalds wrote:
> 
>  - spinlock:
> 
> 	fetchadd4.acq r1=[p],1
> 	target = (r1 & 32767);

Oh, and this should have been "target = (r1+1) & 32767", since fetchadd 
will return the old value (I think), not the incremented one.

In general, that whole thing was meant to be more pseudo-code than 
anything directly working. As if that wasn't obvious from me freely mixing 
assembler code ('fetchadd4.acq' and 'st2.rel') with C-like pseudo-code.

But I checked, and 'st2.rel' seems to be a valid opcode, and the memory 
ordering constraints seems to be ok with mixing differently sized 
operations on the same memory. So I think my basic algorithm of 
using fetchadd4 should be ok.

			Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux