Skip to content

Commit

Permalink
test_a
Browse files Browse the repository at this point in the history
  • Loading branch information
nunojsa committed Feb 6, 2025
1 parent 5234cca commit 634fac0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions iiod/responder.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@ static void free_block_entry(struct block_entry *entry)
static void block_entry_put(struct block_entry *entry)
{
entry->refcnt--;
printf("put: refcnt: %u\n", entry->refcnt);
if (entry->refcnt == 0)
printf("(%p): %u - pet: refcnt: %u\n", entry, entry->idx,
entry->refcnt);
if (!entry->refcnt)
free_block_entry(entry);
}

static void block_entry_get(struct block_entry *entry)
{
entry->refcnt++;
printf("get: refcnt: %u\n", entry->refcnt);
printf("(%p): %u - get: refcnt: %u\n", entry, entry->idx,
entry->refcnt);
}

static void free_buffer_entry(struct buffer_entry *entry)
Expand Down

0 comments on commit 634fac0

Please sign in to comment.