diff options
author | David Härdeman <david@hardeman.nu> | 2020-06-16 11:22:46 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-06-16 11:22:46 +0200 |
commit | cab7429706aa6fce9d217ba6c5e3b6e5557914d5 (patch) | |
tree | 5f718ffb09cabf720ea19fedccac9e3ba087f8e9 /uring.c | |
parent | 18a5dcf9ef6f9bde77326bb363ec61bbf6b5e587 (diff) |
Cleanup debugging macros a bit
Diffstat (limited to 'uring.c')
-rw-r--r-- | uring.c | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -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"); |