feat(scheduler-sim-live-allocation): add unsatisfiable-cache callback seam (task 1.1)
Adds a NULL-by-default lookup/populate callback seam on xce_sched_core_t, mirroring cache_clear_cb's proven shape, so the allocation dispatch chokepoint can consult the unsatisfiable-resreq cache without a normal-mode-only field access in shared code. Adapters live in alloc_cache.c and are registered only during normal-mode startup; simulation mode leaves both callbacks NULL and always computes fresh. Adds the scheduler-sim-live-allocation spec (requirements/design/ research/tasks) as the planning artifact this and subsequent tasks implement against. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
This commit is contained in:
parent
487e7b9419
commit
89297dc825
10 changed files with 1130 additions and 0 deletions
|
|
@ -141,4 +141,22 @@ extern void cache_clear(xce_scheduler_t* sched);
|
|||
*/
|
||||
extern void xce_alloc_cache_clear_cb(xce_sched_core_t* core);
|
||||
|
||||
/*
|
||||
* xce_alloc_cache_lookup_cb / xce_alloc_cache_populate_cb - the
|
||||
* xce_unsatisfiable_lookup_cb_t / xce_unsatisfiable_populate_cb_t (core.h)
|
||||
* adapters for cache_lookup()/cache_insert() above (scheduler-sim-live-
|
||||
* allocation spec, task 1.1, Req 5.2). Registered on the real
|
||||
* xce_scheduler_t's core via direct field assignment in main.c's
|
||||
* normal-mode-only startup branch, alongside xce_alloc_cache_clear_cb()
|
||||
* just above. See alloc_cache.c's own doc comment on these functions for
|
||||
* the full rationale, including why they live here rather than in
|
||||
* driver.c.
|
||||
*/
|
||||
extern int xce_alloc_cache_lookup_cb(xce_sched_core_t* core,
|
||||
xce_sched_obj_t* obj,
|
||||
int* out_reason_category);
|
||||
extern void xce_alloc_cache_populate_cb(xce_sched_core_t* core,
|
||||
xce_sched_obj_t* obj,
|
||||
int reason_category);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue