feat(scheduler-allocator-runner): plan generators initialise from the scheduling core (task 1.1)
xce_alloc_plan_iter_t.init takes xce_sched_core_t* instead of xce_scheduler_t*; both built-in generators, both allocators' call sites and the contract-test stub follow. The parjob purity test now shows an identical plan sequence for a NULL and a poisoned core. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e2266582b2
commit
86ee3491dd
6 changed files with 32 additions and 32 deletions
|
|
@ -86,15 +86,15 @@ typedef struct xce_alloc_plan_iter_s xce_alloc_plan_iter_t;
|
|||
* xce_alloc_plan_iter_t* iter = &iter_storage;
|
||||
* xce_alloc_plan_t* plan;
|
||||
*
|
||||
* if (iter->init(iter, primary_resreq, sched) != 0) { ... }
|
||||
* if (iter->init(iter, primary_resreq, core) != 0) { ... }
|
||||
* while ((plan = iter->next(iter)) != NULL) { ... }
|
||||
* iter->fini(iter);
|
||||
*/
|
||||
struct xce_alloc_plan_iter_s {
|
||||
/* Initialize the iterator for a given primary resreq and scheduler
|
||||
* state. Returns 0 on success, nonzero on error. */
|
||||
/* Initialize the iterator for a given primary resreq and scheduling
|
||||
* core state. Returns 0 on success, nonzero on error. */
|
||||
int (*init)(xce_alloc_plan_iter_t* iter, xce_primary_resreq_t* resreq,
|
||||
xce_scheduler_t* sched);
|
||||
xce_sched_core_t* core);
|
||||
|
||||
/* Return the next candidate plan, or NULL when exhausted. Successive
|
||||
* calls return plans ordered most-preferred to least-preferred, per
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue