From b9bdc279f228c6e70d05c85361fe7d018beba444 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 7 Sep 2017 15:30:08 +0100 Subject: Update scheduler logging to use catagory --- frontends/beos/schedule.cpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'frontends/beos') diff --git a/frontends/beos/schedule.cpp b/frontends/beos/schedule.cpp index 552a7cd49..c2caea954 100644 --- a/frontends/beos/schedule.cpp +++ b/frontends/beos/schedule.cpp @@ -28,11 +28,7 @@ extern "C" { #include "netsurf/content_type.h" #include "netsurf/browser_window.h" -#ifdef DEBUG_BEOS_SCHEDULE #include "utils/log.h" -#else -#define LOG(x...) -#endif } /** Killable callback closure embodiment. */ @@ -58,8 +54,10 @@ nsbeos_schedule_kill_callback(void *_target, void *_match) _nsbeos_callback_t *match = (_nsbeos_callback_t *)_match; if ((target->callback == match->callback) && (target->context == match->context)) { - NSLOG(netsurf, INFO, "Found match for %p(%p), killing.", - target->callback, target->context); + NSLOG(schedule, DEBUG, + "Found match for %p(%p), killing.", + target->callback, + target->context); target->callback = NULL; target->context = NULL; target->callback_killed = true; @@ -70,7 +68,9 @@ nsbeos_schedule_kill_callback(void *_target, void *_match) static void schedule_remove(void (*callback)(void *p), void *p) { - NSLOG(netsurf, INFO, "schedule_remove() for %p(%p)", cb->callback, + NSLOG(schedule, DEBUG, + "schedule_remove() for %p(%p)", + cb->callback, cb->context); if (callbacks == NULL) return; @@ -83,7 +83,7 @@ schedule_remove(void (*callback)(void *p), void *p) nserror beos_schedule(int t, void (*callback)(void *p), void *p) { - NSLOG(netsurf, INFO, "t:%d cb:%p p:%p", t, cb->callback, cb->context); + NSLOG(schedule, DEBUG, "t:%d cb:%p p:%p", t, cb->callback, cb->context); if (callbacks == NULL) { callbacks = new BList; @@ -113,7 +113,7 @@ nserror beos_schedule(int t, void (*callback)(void *p), void *p) bool schedule_run(void) { - NSLOG(netsurf, INFO, "schedule_run()"); + NSLOG(schedule, DEBUG, "schedule_run()"); earliest_callback_timeout = B_INFINITE_TIMEOUT; if (callbacks == NULL) @@ -122,7 +122,8 @@ schedule_run(void) bigtime_t now = system_time(); int32 i; - NSLOG(netsurf, INFO, "Checking %ld callbacks to for deadline.", + NSLOG(schedule, DEBUG, + "Checking %ld callbacks to for deadline.", this_run->CountItems()); /* Run all the callbacks which made it this far. */ @@ -135,8 +136,11 @@ schedule_run(void) i++; continue; } - NSLOG(netsurf, INFO, "Running callbacks %p(%p).", - cb->callback, cb->context); + NSLOG(schedule, DEBUG, + "Running callbacks %p(%p).", + cb->callback, + cb->context); + if (!cb->callback_killed) cb->callback(cb->context); callbacks->RemoveItem(cb); -- cgit v1.2.3