Can I run any real-time thread, by setting SCHED_FIFO, without an expansion shield on a raspberry pi 3b+?

If I have a raspberry pi 3b+ with expansion shield, can I run any real-time thread other than the audio capture & playback related threads? e.g. UDP networking thread, audio processing thread. If I can, could these threads have higher priority than audio capture & playback related threads?

Can I run any real-time thread, by setting SCHED_FIFO, without an expansion shield on a raspberry pi 3b+?

Of course. But in a system with Elk running on top of Xenomai, those are not 1st class citizen “real-time” threads. They will always have lower priority than Xenomai’s Cobalt kernel real-time tasks.

If I have a raspberry pi 3b+ with expansion shield, can I run any real-time thread other than the audio capture & playback related threads? e.g. UDP networking thread, audio processing thread. If I can, could these threads have higher priority than audio capture & playback related threads?

Thanks!

If you need to access any Linux infrastructure (e.g. for a networking thread), then they will never have higher priority than the audio driver threads.

It’s possible to spawn a new thread that doesn’t do any I/O, purely for DSP computation, at a similar priority level than the main audio RT thread. Take a look for example at the TWINE library which, on Xenomai-enabled systems, spawns Xenomai’s RT threads: