linux - How do I implement the ABA solution? -
i trying implement michael-scott fifo queue here. i'm unable implement solution aba problem. error.
error: incompatible type argument 1 of '__sync_val_compare_and_swap' for reference, using linux box compile on intel architecture. if need more information on setup please ask.
it seems sync_val_cas handles 32 bit values. when remove counter used eliminate aba problem, compiles , runs fine.
does know of relevant 64-bit cas instruction should using here?
as additional question, there better (faster) implementations of lock-free fifo queues out there? came across this nir shavit et al seems interesting. wondering if others have seen similar efforts? thanks.
assuming gcc, try using "march" switch. this: -march=i686
there __sync_bool_compare_and_swap. don't know if faster or not.
Comments
Post a Comment