Use thread-local instead of global in UnderrunHandlerLinux
Categories
(Core :: Audio/Video: cubeb, defect, P2)
Tracking
()
People
(Reporter: karlt, Unassigned)
References
Details
A different thread can reset gRealtimeLimitReached
, in which case the thread signalled may not be demoted.
An alternative would be to send a thread id over a pipe to a realtime watchdog thread that would demote the process, avoiding the risk of waiting for the infringing thread to yield.
Reporter | ||
Comment 1•4 years ago
|
||
There may be some limit to the meaning of the thread receiving SIGXCPU
.
RLIMIT_RTTIME
applies to a single thread, but SIGXCPU
is sent to the thread group (a process-directed signal).
man 7 signal says
A process-directed signal may be delivered to any one of the threads
that does not currently have the signal blocked. If more than one of
the threads has the signal unblocked, then the kernel chooses an
arbitrary thread to which to deliver the signal.
In Linux, the realtime thread is usually tried first for signal delivery, but, if that thread is blocking the signal or in some other cases, the signal will be delivered to another thread.
I don't see any thread-identifying info in the siginfo.
Updated•2 years ago
|
Description
•