feat(scheduler-core): implement session-start signal + decision callback (task 4.4)
Adds xce_core_go()/xce_core_end_session() (new core_session.c): xce_core_go() is non-blocking, performs begin-session state reset (select-eval-ctx, resval resets), signals the picker thread via wbuf, and returns -EINVAL on a reentrant call while a session is already active (proven a true no-op, not just an early return). Draining core->decisions and invoking the driver's on_decision callback is the driver's own responsibility between core_go() and core_end_session() (confirmed driver-owned, not core-owned, per the Driver <-> Core protocol). xce_core_set_decision_cb() registers the callback + driver context as a separate setter, keeping xce_sched_core_init()'s live sched_init() call site untouched. Adds XCE_DECISION_PREEMPT to decision.h (jobid/victims[]/reason) alongside the existing DISPATCH/ PEND types. Additive only — sched_go/sched_begin_session/ sched_end_session/sched_allocator/main.c remain untouched. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019dw5WnN3DXStaEaPYfACU1
This commit is contained in:
parent
e6c0a2448a
commit
de69b6288d
9 changed files with 900 additions and 26 deletions
|
|
@ -4,6 +4,7 @@ scheduler_srcs = [
|
|||
'src/scheduler.c',
|
||||
'src/core.c',
|
||||
'src/core_events.c',
|
||||
'src/core_session.c',
|
||||
'src/decision.c',
|
||||
'src/schedobj.c',
|
||||
'src/plugin.c',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue