Lock free no_std linked list implementations

Hello, I am looking for some no_std implementation of linked list, where I can create a node myself and insert it, but without mutexes or critical sections, just on atomics. It would be good if deletion, access and insertion are not traversing the whole list. Can anyone point me at crates like this? Thanks!

I don't think it's possible to implement a general lock-free concurrent doubly linked list, not with current CPU architecture, as you would need to simultaneously write 2 pointers in two different nodes.

however, if you don't care about insertion into the middle of the list, there is some research on lock-free deques.

Well, I have a rust implementation of https://dl.acm.org/doi/10.5555/645958.676105 , so it is possible, but I was looking for some alternatives etc

Oh, yes, it is a singly linked list, not double, right

I haven't tried it but have run across this one.

Unfortunately, it's push-like methods take &mut :sweat_smile:

Darn. But that supports what @binarycat said about this being infeasible with atomics alone. :slight_smile:

You are probably looking for something like arc_swap. It's going to be tough to find any lightweight crate that does this, mainly because it's hard to ensure that atomic pointers aren't dangling.