Commit Graph

16 Commits

Author SHA1 Message Date
Dalton Messmer
2c6d88f799 Add GUARD_H closing comments 2023-01-05 17:58:49 -05:00
Dalton Messmer
fe6df8dbaf Add namespace prefix to include guards 2023-01-02 19:51:32 -05:00
Levin Oehlmann
28ec71f91a clang-tidy: Apply modernize-use-equals-default everywhere (#6450) 2022-06-26 08:48:24 +02:00
Levin Oehlmann
7227c89847 Namespace lmms (#6174)
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.

Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .

Co-authored-by: allejok96 <allejok96@gmail.com>
2022-06-19 20:08:46 +02:00
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
Lukas W
c9c22e4a0e shared_object: Use deleteLater in unref for thread safety
This makes unref safe when it's not called from within the object's thread.

Fixes #4009
2017-11-24 13:30:15 +01:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Umcaruje
6fb923cba2 Correct the program name and site in the descriptions. 2014-11-04 22:56:50 +01:00
Tobias Doerffel
6a1a295cec More CLANG compiler warning fixes 2014-03-21 11:14:22 +01:00
Tobias Doerffel
f4dbb2ff5c sed: s/( void )/(), s/FALSE/false/, s/TRUE/true
Replaced remaining occurences of old constants and superfluous "void"
on empty argument list of functions.
(cherry picked from commit 166701f9f3)
2009-08-25 01:42:20 +02:00
Tobias Doerffel
fce25dc625 fixed a bunch warnings and remarks issued by Intel Compiler
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1722 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-02 11:48:59 +00:00
Tobias Doerffel
74bc575ad1 added mutex to protect reference-counter
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@766 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-03-04 11:28:58 +00:00
Javier Serrano Polo
e7f5fb8977 mutex, detuning helpers, GUI updates, play handles, many many changes... (2)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@480 0778d3d1-df1d-0410-868b-ea421aaaa00d
2007-05-07 19:11:23 +00:00
Javier Serrano Polo
56eead9a65 added singerbot plugin
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@452 0778d3d1-df1d-0410-868b-ea421aaaa00d
2007-01-20 14:24:27 +00:00
Javier Serrano Polo
474cb5f6cc updated FSF address
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@380 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-08-27 23:24:31 +00:00
Javier Serrano Polo
4210a4270e initial release, shared object for use among threads
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@356 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-08-24 00:16:07 +00:00