[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [f-cpu] another DATE report
> Example of a CAS application : TAS, Test-And-Set, wellknown:
>
> int TAS (int *pointer) {
> return CAS (pointer,0,1);
> }
>
> A spinlock :
>
> void spinlock (int *pointer) {
> while (TAS (pointer));
> }
Must be :
void spinlock (int *pointer) {
while (! TAS (pointer));
}
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu in the body. http://f-cpu.seul.org/