Return owner count when resource already owned
authorJustin Sobota <jsobota@ti.com>
Mon, 13 May 2013 19:53:15 +0000 (15:53 -0400)
committerJustin Sobota <jsobota@ti.com>
Mon, 13 May 2013 19:53:15 +0000 (15:53 -0400)
src/rm_allocator.c

index 0e74966c6ff6aabc5be411b2f543da058517a518..a178f8b17da5fba2d4dcecc6f5c7bf30e1908b99 100644 (file)
@@ -802,6 +802,10 @@ static int32_t allocatorAllocate(Rm_Handle rmHandle, Rm_Allocator *allocator, in
                         RB_INSERT(_Rm_AllocatorResourceTree, allocator->allocatorRootEntry, matchingNode);
                     }
                 }
+                else {
+                    /* Already owned by requesting instance.  Just return owner count */
+                    opInfo->resourceInfo->ownerCount = matchingNode->allocationCount;
+                }
                 retVal = RM_SERVICE_APPROVED;
             }
         }