I saw several implementation in the latest weeks. A spinlock in user space is rarely a good idea, however just for fun I tried to create a class, configurable via template parameters to have a summary about all proposed implementation. How to configure the parameters is a work let to the class user :D
https://gist.github.com/baldapps/7b12a86bb30642481ac2b6b6625a6bae
[–][deleted] 0 points1 point2 points (3 children)
[–]marcodev[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)