feat(scheduler-core): wire builtin_fcfs as registered default picker (task 2.4)
Registers builtin_fcfs at scheduler startup and makes it the default job_pick_plugin, replacing the hardcoded "xce_sched_fcfs" literal in sched_job_picker() with a fail-loud lookup through sched_resolve_job_picker(). The picker thread now branches legacy job_elect_fn plugins (delegated unchanged, preserving their self-contained wbuf-driven loop) from native xce_job_picker_iface_t pickers (driven by a new per-session loop), and the allocator now calls on_dispatch/on_pend for every picker as Req 1 AC 4 requires. Closes task 2.3's flagged picker/allocator concurrency race with a mutex on fcfs_plugin_data_t, and adds cancel points to next_job().
This commit is contained in:
parent
fcb32a8b30
commit
7ee9a16f53
11 changed files with 1036 additions and 54 deletions
|
|
@ -62,6 +62,19 @@ int sched_queue_is_ready(xce_sched_queue_t* q)
|
|||
|
||||
int sched_job_is_ready(xce_sched_job_t* j) { return (j != g_not_ready_job); }
|
||||
|
||||
/* Task 2.4 added register_builtin_fcfs() (bottom of builtin_fcfs.c), which
|
||||
* calls plugin_register() (plugin.c, not linked into this white-box TU).
|
||||
* Stub to satisfy the linker -- this file's tests (task 2.3's session/
|
||||
* post-allocation hooks) don't exercise registration; see
|
||||
* test_picker_wiring.c (task 2.4) for coverage against the REAL
|
||||
* plugin_register(). */
|
||||
int plugin_register(void* arg1, void* arg2)
|
||||
{
|
||||
(void)arg1;
|
||||
(void)arg2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include "../src/plugins/builtin_fcfs.c"
|
||||
|
||||
void setUp(void) { return; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue