summaryrefslogtreecommitdiff
path: root/uring.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-16 11:22:46 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-16 11:22:46 +0200
commitcab7429706aa6fce9d217ba6c5e3b6e5557914d5 (patch)
tree5f718ffb09cabf720ea19fedccac9e3ba087f8e9 /uring.c
parent18a5dcf9ef6f9bde77326bb363ec61bbf6b5e587 (diff)
Cleanup debugging macros a bit
Diffstat (limited to 'uring.c')
-rw-r--r--uring.c17
1 files changed, 7 insertions, 10 deletions
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");