summaryrefslogtreecommitdiff
path: root/frontends/beos/schedule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/beos/schedule.cpp')
-rw-r--r--frontends/beos/schedule.cpp28
1 files changed, 16 insertions, 12 deletions
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);