mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-26 21:00:21 +00:00
The absense of a call hierarchy between public and private functions results in many unnecessary recursive locks: public functions require locks, which are also called by other public and private functions in this file. Fortunately, since the lock is private to this file, this situation can be avoided by establishing a call hierarchy: - Public functions must lock, and can only call private functions in this file - Private functions must not lock, and can only call private functions in this file - No function can call any public function in this file, the only exception being mp_input_wakeup and mp_input_parse_cmd. This arrangement ensures that there will be no locks more than necessary: All public function calls will lock only once, and never recursively.