eina debug - add comments to cpu debug using locks to pause sysmon
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sun, 23 Jul 2017 09:43:58 +0000 (18:43 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sun, 23 Jul 2017 09:43:58 +0000 (18:43 +0900)
this is intended so leave comments saying so. coverity doesn't like it
with CID 1377549

src/lib/eina/eina_debug_cpu.c

index f7cb2cc..0f25b4b 100644 (file)
@@ -261,6 +261,7 @@ _cpufreq_on_cb(Eina_Debug_Session *session EINA_UNUSED, int cid EINA_UNUSED, voi
      {
         _eina_debug_sysmon_reset = 1;
         _eina_debug_sysmon_active = 1;
+        // this is intended. taking this lock allows sysmon to run
         eina_lock_release(&_sysmon_lock);
      }
    return EINA_TRUE;
@@ -271,6 +272,7 @@ _cpufreq_off_cb(Eina_Debug_Session *session EINA_UNUSED, int cid EINA_UNUSED, vo
 {
    if (_eina_debug_sysmon_active)
      {
+        // this is intended. taking this lock blocks sysmod from running
         eina_lock_take(&_sysmon_lock);
         _eina_debug_sysmon_active = 0;
      }