Closed ipilcher closed 4 years ago
The logic in fcd_main_read_monitor()
exists so that it doesn't attempt to lock/unlock a (non-existent) mutex for the "logo monitor," which displays a static message.
Given the very low cost of locking/unlocking an uncontended mutex, simplify the code by eliminating the (faulty) logic in fcd_main_read_monitor()
and adding a mutex to the logo monitor.
fcd_main_read_monitor()
assumes that only monitors that have a separate thread (as indicated by a non-zeromonitor_fn
) have a mutex associated with their message buffer.This is not true of the HDD temperature monitor; its message buffer is updated by the SMART monitor thread, but it still has a mutex, even though it does not have a separate thread (and thus has a "null"
monitor_fn
).