mirror of
https://review.haiku-os.org/haiku
synced 2025-01-21 05:53:46 +01:00
52d500e5b4
The thread that is being [un]scheduled already has its time_lock locked in {stop|continue}_cpu_timers(). When updating the TeamTimeUserTimer, the team is asked for its cpu time. Team::CPUTime() then iterates the threads of the team and locks the time_lock of the thread again. This workaround passes a possibly locked thread through the relevant functions so Team::CPUTime() can decide whether or not a thread it iterates needs to be locked or not. This works around #11032 and its duplicates #11314 and #11344.