improve resmgr

This commit is contained in:
Rongsong Shen 2025-12-18 16:20:41 +08:00
parent 4db6b039c5
commit 1f1e4fdaba
10 changed files with 107 additions and 221 deletions

View file

@ -65,7 +65,7 @@ static int update_val_res(cluster_t* c, worker_t* w, xce_resource_t* r,
if (r->flags & XCE_RESF_SHARED) {
/* update shared resource */
array = &(c->resmgr.sharedinst);
array = &(c->sharedinst);
} else {
/* update host based resource */
array = &(w->host.resvals);
@ -457,7 +457,7 @@ int get_resval(cluster_t* c, char* resname, char* host, xce_val_t* val)
array = &(w->host.resvals);
} else {
array = &(c->resmgr.sharedinst);
array = &(c->sharedinst);
}
if (r->idx < array->caps) {