save works

This commit is contained in:
Rongsong Shen 2026-03-02 12:14:30 +08:00
parent b748e30d20
commit f4b1ba4cd7
21 changed files with 373 additions and 324 deletions

View file

@ -341,7 +341,7 @@ static int sched_job_update_fun(int type, int situation, void* data, va_list ap)
xce_notify_data_t xdata = {
.event = NotifyData_data_schedUpdateJob,
.data = {
.sched_update_job = job->job
.sched_update_job = &(job->job)
}
};
/* clang-format on */
@ -419,11 +419,11 @@ static int sched_worker_change(int type, int situation, void* data,
int rc = 0;
xlist_t wlist;
TRACE("%s worker %s idx %d situation %d", __func__, w->host->name, w->idx,
TRACE("%s worker %s idx %d situation %d", __func__, w->host.name, w->idx,
situation);
collect_resval_with_idx(&(w->host->resvals), &(w->host->nresvals_to_sched),
&(w->host->resvals_to_sched));
collect_resval_with_idx(&(w->host.resvals), &(w->host.nresvals_to_sched),
&(w->host.resvals_to_sched));
mylock_lock(&(c->sched.lock));
if (c->sched.ep != NULL) {
@ -440,8 +440,8 @@ static int sched_worker_change(int type, int situation, void* data,
}
mylock_unlock(&(c->sched.lock));
free_resval_with_idx_list(&(w->host->resvals_to_sched),
w->host->nresvals_to_sched);
free_resval_with_idx_list(&(w->host.resvals_to_sched),
w->host.nresvals_to_sched);
return rc;
}
@ -458,7 +458,7 @@ static int sched_worker_join(int type, int situation, void* data, va_list ap)
return 0;
}
rc = key_find(c->workermgr, (void *)name, (void **)&w);
rc = key_find(c->workermgr, (void*)name, (void**)&w);
if (rc < 0) {
return rc;
}
@ -558,7 +558,7 @@ static int sched_queue_update(int type,
xce_notify_data_t xdata = {
.event = NotifyData_data_schedUpdateQueue,
.data = {
.sched_update_queue = q->queue
.sched_update_queue = &(q->queue)
}
};
/* clang-format on */