Paul Davis
be24b51a6b
downloader: remove unnecessary header
2022-09-13 14:15:24 -06:00
Paul Davis
d087cd9465
downloader: use PBD::Thread instead of std::thread
2022-09-13 14:14:53 -06:00
Paul Davis
aeccb137fd
threaded archive inflation for library mgmt
2022-09-13 13:53:45 -06:00
Paul Davis
375daf4810
libpbd: new threader Inflater and Downlaoder classes
2022-09-13 13:53:45 -06:00
Paul Davis
2061c3780d
FileArchive: minor fixes to get progress reporting working
2022-09-13 13:53:45 -06:00
Robin Gareus
18474d89f8
SystemExec try SIGINT before SIGKILL
...
Even though SIGINT is intended to be sent from terminals only,
it is more successful at terminating various child processes than
closing stdin and sending SIGTERM.
2022-09-12 16:17:55 +02:00
John Emmas
7418da4703
Add a missing #include
...
(needed for call to std::back_insert_iterator)
2022-09-10 10:20:37 +01:00
Robin Gareus
57430f33c2
Fix file-archive, curl API
2022-09-08 15:46:06 +02:00
Paul Davis
73331ae46a
libpbd: fix decl of remove_extra_whitespaces
2022-09-07 17:56:52 -06:00
Paul Davis
5563117a1b
add remove_extra_whitespace() to libpbd
2022-09-07 17:03:08 -06:00
Paul Davis
26b5700957
filearchive: extend API
2022-09-07 17:03:08 -06:00
Robin Gareus
2a7d528c5d
Update and consolidate gettext.h
...
This fixes compilation with --no-nls on modern systems
2022-09-07 00:09:54 +02:00
Robin Gareus
25d1209bb4
Only dump SessionEvent pool in debug builds
...
This ensures that the user will see a "POOL OUT OF MEMORY" message.
In rare case dumping the pool can segfault when printing the Event,
The pool is zero initialized and only ever contains events, so
in theory it is safe to print them..
2022-07-07 22:34:11 +02:00
Robin Gareus
9e11ef4f39
MixerScene: handle edge-case with midi-cc/bender controllables
2022-07-07 16:06:08 +02:00
Robin Gareus
effc209070
Place Pool in PBD namespace
...
A public class named "Pool" in the global namespace just
calls for symbol name conflicts.
2022-07-07 05:21:54 +02:00
Robin Gareus
8418e7c954
NO-OP: clang-format
2022-07-07 05:21:49 +02:00
Robin Gareus
1694c71cd5
Implement memory-pool debug-dump
...
This will allow to trace "POOL OUT OF MEMORY" and see
which events fill up the event/memory pool.
2022-07-07 05:21:31 +02:00
Paul Davis
0d70be3a05
miscellaneous fixes for warnings from -Wconversion
2022-07-04 22:01:48 -06:00
Robin Gareus
9ab32d7cb4
Fix builds on platforms without execinfo (amend cd4549aff7)
2022-06-23 01:59:58 +02:00
Paul Davis
0004ca2c41
add useful DEBUG_RESULT and DEBUG_RESULT_CAST to pbd/debug.h
2022-06-22 13:31:08 -06:00
Paul Davis
d917d7b351
fix actual x_assert macro definition
2022-06-22 13:31:08 -06:00
Paul Davis
df641765ec
add new header for x_assert() macro
2022-06-22 13:31:08 -06:00
Paul Davis
24f1a65d5f
use C style cast in C code, rather than C++ constructor
2022-06-22 13:31:08 -06:00
Paul Davis
48a109e8c8
fix snprintf buffer size warning
2022-06-22 13:31:08 -06:00
Paul Davis
cd4549aff7
fix signed/unsigned warning
2022-06-21 17:31:50 -06:00
Paul Davis
dc4235efbe
fix left-shift of negative value warning
2022-06-21 17:31:17 -06:00
Paul Davis
32b41037b5
libpbd: do not use debug transmitter inside BaseUI::signal_new_request() to avoid recursion
2022-06-13 13:43:31 -06:00
Paul Davis
20997dfa78
add new exception-safe RAII object, that increments/decrements its argument
2022-06-13 10:51:04 -06:00
Robin Gareus
95aa39d1c4
Update call_slot() API, inform caller if slot cannot be queued
...
It can happen that ::get_request() returns NULL if the
EventPool is full. In that case the slot is never called.
In this case the caller can now take action.
2022-06-09 01:46:27 +02:00
Robin Gareus
87ee609339
Amend previous commit, fix debug print format
2022-06-03 05:32:19 +02:00
Robin Gareus
fd5d290217
Fix mach thread time constraints on M1
...
or any system where timebase is not 1 tick per ns.
2022-06-03 05:27:42 +02:00
Robin Gareus
c2cff575b7
Add debug info to track down M1 time-constraint issue
2022-06-03 03:52:43 +02:00
Robin Gareus
60db5a827f
Use SYS_futex instead of __NR_futex
...
Use the C library definition for portability; also test
for support instead of unconditionally enabling it.
2022-05-30 21:56:49 +02:00
Paul Davis
12e5042ece
libpbd: add muldiv() to compute v * (n/d) without overflow
2022-05-27 12:47:44 -06:00
Paul Davis
e1f5fb0206
libpbd: change GlibEventLoopCallback to use C API not C++
...
We discovered in the past that the C++ API for GSource/Glib::Source has some fatal and unfixable flaws. Copy similar
code and just use the C API for GSource instead
2022-05-19 22:24:43 -06:00
Robin Gareus
a811583380
Add API to query registered controllers
2022-05-19 20:08:08 +02:00
Paul Davis
4c1506e50e
add copyright notices
2022-05-16 15:41:56 -06:00
Paul Davis
968533cc23
(re)add mechanism for a callback in any glib event loop executed before the loop "executes"
...
This is based on code from earlier commits that were later reversed, but we need some mechanism
to ensure that threads have a thread local tempo map ptr set. The big difference is that this
time we do not implement this for all instances of an AbstractUI - implementation is left to
each thread/event loop
2022-05-16 15:24:52 -06:00
itmuckel
9178ca635a
Remove unused imports and modernize stateful.cc
2022-05-13 23:07:49 +02:00
Robin Gareus
40fa6e2023
Improve PBD::Semaphore performance
...
Skip syscall if no threads are waiting and decouple atomic
value from futex address so that FUTEX_WAIT does not fail.
2022-05-12 05:27:27 +02:00
Robin Gareus
f849f3ce2c
Use futex semaphores on Linux only
2022-05-12 00:56:33 +02:00
Robin Gareus
5ca76789c5
Allow to query capacity of MPMC queue
...
This is in preparation to grow the queue as needed.
2022-05-12 00:40:31 +02:00
Robin Gareus
34678c094a
Implement Futex semaphore
2022-05-11 23:55:41 +02:00
Robin Gareus
f7e917c123
Potential fix for M1 x-thread events
...
On M1, the cross-thread channel sets G_IO_PRI in addition to G_IO_IN
this breaks various assumptions in receivers, which test for ~G_IO_IN
as error condition.
2022-05-02 00:02:33 +02:00
Paul Davis
3d860b9665
libpbd: do not use DEBUG transmitter from inside AbstractUI<T> request methods
...
This will lead to recursion, since delivering the debug msg goes through a request method.
Discovered by running with -D all
2022-04-26 22:04:08 -06:00
Robin Gareus
9ce91e2952
NO-OP: clang-format
2022-04-23 23:12:13 +02:00
Robin Gareus
c1d6c0690e
Fix poll() edge case on macOS, clean up logic
...
Return from poll_for_request() when CrossThreadChannel is
closed/destroyed. -- see also f4166fb61d
This also cleans up poll API usage, and check for nonnegative
return value is added.
2022-04-23 23:12:10 +02:00
Robin Gareus
defc902571
Allow to use Destructible as virtual base class
...
This is in preparation for a pure-virtual base class for
PluginInsert to expose `DropReferences` in the virtual base.
```
class PlugInsertBase : virtual public PBD::Destructible
class PluginInsert : public Processor, public PlugInsertBase
class Processor : public SessionObject
class SessionObject : public PBD::StatefulDestructible
```
2022-04-14 16:35:02 +02:00
luz paz
fb55878375
Fix source typos (heirarchy->hierarchy)
2022-04-08 21:38:00 +02:00
Paul Davis
7bf89ce109
Constification: make Stateful::get_state() const, with all other required const-ness added (libs)
2022-04-06 21:56:59 -06:00