Based on Hazard Pointers, implemented in C according to Maged M. Michael's paper
Note:
- You can implement a bounded queue by using queue_attr_t.
- Tested by Cppcheck, Valgrind, and ThreadSanitizer roughly
- ./wrapper_test.sh "./main 1000 10 0" 10 means executing "./main 1000 10 0" 10 times
to-do list:
- Remove retired_next from the struct node. (is it possible?)
- Implement PrepareForReuse().
- use of size_t is preferred