Method to expose the resource quota of a resource user

pull/9181/head
Dan Born 8 years ago
parent 1a741606fe
commit e955c1f236
  1. 5
      src/core/lib/iomgr/resource_quota.c
  2. 2
      src/core/lib/iomgr/resource_quota.h

@ -695,6 +695,11 @@ grpc_resource_user *grpc_resource_user_create(
return resource_user;
}
grpc_resource_quota *grpc_resource_user_quota(
grpc_resource_user *resource_user) {
return resource_user->resource_quota;
}
static void ru_ref_by(grpc_resource_user *resource_user, gpr_atm amount) {
GPR_ASSERT(amount > 0);
GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&resource_user->refs, amount) != 0);

@ -88,6 +88,8 @@ typedef struct grpc_resource_user grpc_resource_user;
grpc_resource_user *grpc_resource_user_create(
grpc_resource_quota *resource_quota, const char *name);
grpc_resource_quota *grpc_resource_user_quota(
grpc_resource_user *resource_user);
void grpc_resource_user_ref(grpc_resource_user *resource_user);
void grpc_resource_user_unref(grpc_exec_ctx *exec_ctx,
grpc_resource_user *resource_user);

Loading…
Cancel
Save