summaryrefslogtreecommitdiff
path: root/uring.c
diff options
context:
space:
mode:
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");