cpu-sched: Handle suspend event too 41/242541/3
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 27 Aug 2020 14:22:09 +0000 (16:22 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Fri, 28 Aug 2020 10:19:26 +0000 (12:19 +0200)
resume event was supported previously, suggesting suspend is missing

Change-Id: Idabe1e8559961332079de018854321466f8ea902

src/cpu/cpu-sched.c

index 2f98ad9..e6170cf 100644 (file)
@@ -496,6 +496,7 @@ static void register_notifiers()
 {
        if (cs.fg) {
                register_notifier(RESOURCED_NOTIFIER_APP_RESUME, cpu_sched_app_foreground);
+               register_notifier(RESOURCED_NOTIFIER_APP_SUSPEND, cpu_sched_app_background);
 
                register_notifier(RESOURCED_NOTIFIER_APP_FOREGRD, cpu_sched_app_foreground);
                register_notifier(RESOURCED_NOTIFIER_APP_BACKGRD, cpu_sched_app_background);
@@ -515,6 +516,7 @@ static void unregister_notifiers()
 {
        if (cs.fg) {
                unregister_notifier(RESOURCED_NOTIFIER_APP_RESUME, cpu_sched_app_foreground);
+               unregister_notifier(RESOURCED_NOTIFIER_APP_SUSPEND, cpu_sched_app_background);
 
                unregister_notifier(RESOURCED_NOTIFIER_APP_FOREGRD, cpu_sched_app_foreground);
                unregister_notifier(RESOURCED_NOTIFIER_APP_BACKGRD, cpu_sched_app_background);