Multimedia daemons like PulseAudio and PipeWire, running as a regular user, want realtime priority on some of their threads, and they support RealtimeKit https://github.com/heftig/rtkit for that, which is a clever daemon that manages per-thread realtime priority (of all its clients) carefully.
On Linux, rtkit simply uses the POSIX.1b sched_setscheduler call with a thread ID and it just works (I think because Linux threads are just boneless processes, i.e. processes sharing an address space).
In 2006 support for thread IDs in POSIX.1b calls was added FreeBSD… and removed 2 days later to avoid mixing processes and threads (argh, inconvenient).
Well, the syscall that *is* supposed to work for some reason only works for threads of the current process. I'd like to remove this limitation (which was not even advertised on the manpage), because it prevents anything like rtkit from working.