src/proc_watch.cpp
ProcWatch::ProcWatch(NVIDIA &nv, bool enabled, unsigned sleep_ms) noexcept:
        nv(nv), // Nvidia DVC setting
        dirty(false),   // signals watcher that rules need to be reapplied
        active(enabled),        // do stuff?
        terminate(false),       // tells watcher thread that it should shut down
        sleep_ms(sleep_ms)      // sleep timer for watcher thread
{
        watcher = std::thread(&ProcWatch::update, this);
}
// Process watcher
// Scans /proc/$PID/{comms, maps} and queries X server for running processes
// Applies DVC rules according to rules
// TODO: Get rid of STL & use C primitives, performance actually matters here
Process watcher
Scans /proc/$PID/{comms, maps} and queries X server for running processes
Applies DVC rules according to rules
TODO: Get rid of STL & use C primitives, performance actually matters here
Process watcher Scans / proc / $PID / { comms maps } and queries X server for running processes Applies DVC rules according to rules TODO : Get rid of STL & use C primitives performance actually matters here
ProcWatch::ProcWatch(NVIDIA &nv, bool enabled, unsigned sleep_ms) noexcept:
        nv(nv), 
        dirty(false),   
        active(enabled),        
        terminate(false),       
        sleep_ms(sleep_ms)      
{
        watcher = std::thread(&ProcWatch::update, this);
}
ProcWatch :: ProcWatch ( NVIDIA & nv , bool enabled , unsigned sleep_ms ) noexcept : nv ( nv ) , dirty ( false ) , active ( enabled ) , terminate ( false ) , sleep_ms ( sleep_ms ) { watcher = std :: thread ( & ProcWatch :: update , this ) ; }
Process watcher
Scans /proc/$PID/{comms, maps} and queries X server for running processes
Applies DVC rules according to rules
TODO: Get rid of STL & use C primitives, performance actually matters here
Process watcher Scans / proc / $PID / { comms maps } and queries X server for running processes Applies DVC rules according to rules TODO : Get rid of STL & use C primitives performance actually matters here
// Nvidia DVC setting // signals watcher that rules need to be reapplied // do stuff? // tells watcher thread that it should shut down // sleep timer for watcher thread