Files
lmms/include
Matt Kline ffccd6ddd2 Use atomics to count shared_object without locks
C++11 (and subsequent C++ standards) provide portable ways to issue
atomic hardware instructions, which allow multiple threads to load,
store, and modify integers without taking a lock. The standard also
defines a memory model that lets you express the ordering guarantees
around these atomic operations. (x86 is relatively strongly-ordered, but
many other common architectures, such as ARM, are free to reorder loads
and stores unless told not to.)

This patch removes the lock from shared_object and replaces it with the
standard thread-safe reference counting implementation used in
C++'s std::shared_ptr, Rust's std::sync::Arc, and many others.

Additional resources on the topic:
https://assets.bitbashing.io/papers/concurrency-primer.pdf
https://www.youtube.com/watch?v=ZQFzMfHIxng
2018-04-25 12:50:44 +02:00
..
2017-06-12 13:57:08 -04:00
2017-12-20 14:16:16 +09:00
2017-08-01 00:39:00 -04:00
2017-11-08 20:47:22 -05:00
2017-12-11 10:46:19 -05:00
2017-03-08 17:09:57 +01:00
2017-03-16 11:35:18 +00:00
2017-09-14 08:09:54 +09:00
2018-03-09 11:41:17 -05:00
2017-06-26 19:45:59 +02:00
2017-03-16 11:35:18 +00:00
2008-07-22 11:36:50 +00:00
2017-11-22 13:49:57 +01:00
2017-11-24 09:56:08 +09:00
2017-11-22 20:38:10 +01:00
2017-11-17 09:51:56 -05:00
2017-07-20 18:23:10 +02:00
2017-11-22 20:38:10 +01:00
2018-04-03 13:37:25 +02:00
2017-11-22 11:08:47 +01:00
2018-03-07 23:54:28 +09:00
2018-03-07 23:54:28 +09:00
2017-03-16 11:35:18 +00:00
2017-12-26 00:33:11 +01:00
2017-11-14 23:42:26 -05:00
2017-11-01 14:43:39 -04:00
2017-10-16 15:51:21 +02:00
2017-03-16 11:35:18 +00:00