From 69903321a9ca7031dd2327b27c122b690880600e Mon Sep 17 00:00:00 2001 From: Krisztian Litkey Date: Tue, 4 Nov 2014 15:51:51 +0200 Subject: [PATCH] resource: added a few debug printouts. --- src/resource/resource-set.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/resource/resource-set.c b/src/resource/resource-set.c index dec7367..3d245e7 100644 --- a/src/resource/resource-set.c +++ b/src/resource/resource-set.c @@ -331,6 +331,8 @@ void mrp_resource_set_acquire(mrp_resource_set_t *rset, uint32_t reqid) MRP_ASSERT(rset, "invalid argument"); + mrp_debug("acquiring resource set #%d", rset->id); + old_state = rset->state; rset->state = mrp_resource_acquire; @@ -355,6 +357,8 @@ void mrp_resource_set_release(mrp_resource_set_t *rset, uint32_t reqid) MRP_ASSERT(rset, "invalid argument"); + mrp_debug("releasing resource set #%d", rset->id); + if (!rset->class.ptr) rset->state = mrp_resource_release; else { @@ -388,6 +392,8 @@ void mrp_resource_set_updated(mrp_resource_set_t *rset) MRP_ASSERT(rset, "invalid argument"); + mrp_debug("resource set got #%d updated", rset->id); + mrp_list_foreach(&rset->resource.list, resen, n) { res = mrp_list_entry(resen, mrp_resource_t, list); def = res->def; @@ -395,6 +401,8 @@ void mrp_resource_set_updated(mrp_resource_set_t *rset) mask = ((mrp_resource_mask_t)1) << def->id; grant = (mask & rset->resource.mask.grant) ? true : false; + mrp_debug(" %s now %sgranted", def->name, grant ? "" : "not "); + mrp_resource_user_update(res, rset->state, grant); } } -- 2.7.4