From cab7429706aa6fce9d217ba6c5e3b6e5557914d5 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 16 Jun 2020 11:22:46 +0200 Subject: Cleanup debugging macros a bit --- uring.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'uring.c') diff --git a/uring.c b/uring.c index 188b101..ea5934d 100644 --- a/uring.c +++ b/uring.c @@ -113,10 +113,9 @@ uring_task_put(struct cfg *cfg, struct uring_task *task) { struct uring_task *parent = task->parent; - /* - fprintf(stderr, "%s: called with task %s (0x%p) and refcount %u\n", - __func__, task->name, task, task->refcount); - */ + debug(DBG_REF, "task %s (%p), refcount %u\n", + task->name, task, task->refcount); + task->refcount--; if (task->refcount > 0) @@ -132,8 +131,8 @@ uring_task_put(struct cfg *cfg, struct uring_task *task) } if (parent) - fprintf(stderr, "%s: task %s (%p) putting parent %s (%p)\n", - __func__, task->name, task, task->parent->name, task->parent); + debug(DBG_REF, "putting parent %s (%p)\n", + task->parent->name, task->parent); if (task->free) task->free(task); @@ -145,10 +144,8 @@ uring_task_put(struct cfg *cfg, struct uring_task *task) void uring_task_get(struct cfg *cfg, struct uring_task *task) { - /* - fprintf(stderr, "%s: called with task %s (0x%p) and refcount %u\n", - __func__, task->name, task, task->refcount); - */ + debug(DBG_REF, "task %s (%p), refcount %u\n", + task->name, task, task->refcount); if (task->refcount < 0) error("Negative refcount!\n"); -- cgit v1.2.3