Is the linux kernel's list.h thread safe?
Thanks, Chenz
Is the linux kernel's list.h thread safe?
Thanks, Chenz
Just read the implementation; the answer is clearly NO in the presence of writers. (Multiple readers on immutable data is safe.)
Paul McKenney gives an introduction to RCU on the ever-helpful LWN, from which you can glean some tips on managing thread-safe updates to linked lists. Of course, your usage may be simple enough that spinlocks will suffice.