feat(scheduler-sim-live-allocation): make plugin hook dispatch core-safe (task 1.2)
Re-types plugin_job_election()/plugin_prepare_allocation()/ plugin_commit_decision() from (void* arg, ...) to (xce_sched_core_t* core, ...), iterating core->plugins directly instead of deriving it from a normal-mode-only driver struct -- mirroring plugin_begin_session()/plugin_end_session()'s already-completed migration. Adds a new, honestly-typed xce_sched_plugin_t.core field, set by both plugin_register() (normal mode) and plugin_register_core() (simulation mode, closing a gap left since bug-1825 where this path set nothing). The existing plugin->sched field and its plugins/fcfs.c legacy consumer are left untouched. Necessarily updates the 4 existing normal-mode call sites (scheduler.c, resource.c, schedobj.c) to pass &(...->core) -- a C signature migration cannot keep the build green without touching every caller in the same commit; each fix is a minimal argument wrap with no algorithm change, matching design.md's own Implementation Notes for this component. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
This commit is contained in:
parent
89297dc825
commit
e8866641a6
18 changed files with 403 additions and 34 deletions
|
|
@ -69,7 +69,7 @@
|
|||
* entirely) nor sched_try_alloc_on_hosts()/sched_update_existing_*(). */
|
||||
void plugin_unregister(void* arg) { (void)arg; }
|
||||
|
||||
int plugin_prepare_allocation(void* s, xce_sched_ctx_t* c)
|
||||
int plugin_prepare_allocation(xce_sched_core_t* s, xce_sched_ctx_t* c)
|
||||
{
|
||||
(void)s;
|
||||
(void)c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue