Skip to content

Commit

Permalink
[ci] More build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Aug 10, 2023
1 parent 0b7afc2 commit fa2a33e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ossia/dataflow/execution/direct_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ direct_execution_state_policy::direct_execution_state_policy()
while(!m_startFlag.test())
std::this_thread::yield();

ossia::set_thread_realtime(m_threads[i].thread, 80, SCHED_RR);
ossia::set_thread_realtime(m_threads[i].thread, 80, 0);
ossia::set_thread_name(m_threads[i].thread, "ossia net " + std::to_string(i));
ossia::set_thread_pinned(ossia::thread_type::Net, i);

Expand All @@ -38,9 +38,9 @@ direct_execution_state_policy::direct_execution_state_policy()

m_midiThread = std::thread{[this] {
while(!m_startFlag.test())
std::this_thread::sleep_for(std::chrono::microseconds(1));
std::this_thread::yield();

ossia::set_thread_realtime(m_midiThread, 90, SCHED_RR);
ossia::set_thread_realtime(m_midiThread, 90, 0);
ossia::set_thread_name(m_midiThread, "ossia midi");
ossia::set_thread_pinned(ossia::thread_type::Midi, 0);

Expand Down
9 changes: 7 additions & 2 deletions src/ossia/dataflow/execution/execution_policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ using ossia_audio_lock_t = std::unique_lock<ossia::audio_spin_mutex>;
(state).mutex \
}
#else
#define OSSIA_EXEC_STATE_LOCK_READ(state)
#define OSSIA_EXEC_STATE_LOCK_WRITE(state)
using ossia_audio_lock_t = int;
#define OSSIA_EXEC_STATE_LOCK_READ(state) \
ossia_audio_lock_t ossia_read_lock; \
(void)ossia_read_lock;
#define OSSIA_EXEC_STATE_LOCK_WRITE(state) \
ossia_audio_lock_t ossia_write_lock; \
(void)ossia_write_lock;
#endif
namespace ossia
{
Expand Down

0 comments on commit fa2a33e

Please sign in to comment.