For some reason the core_pm_hook is not getting called
every time we get an interrupt with the result that
in some situations like arping for our neighbours mac
address or a tftp transfer we can stall, we never move
forward again.
The reason for those stalls likely bears more investigating
but for now it is sufficient for me to know that they exist
and that I can work around them by polling for wakekup
conditions everytime we call schedule. That gives us code
that works reliably and stays within the letter of the
pxe spec. The oddities of the pxelinux core can be ironed
out later.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
extern int __schedule_lock;
extern bool __need_schedule;
+extern void (*sched_hook_func)(void);
+
void __thread_process_timeouts(void);
void __schedule(void);
void __switch_to(struct thread *);
int __schedule_lock;
bool __need_schedule;
+void (*sched_hook_func)(void);
/*
* __schedule() should only be called with interrupts locked out!
return;
}
+ /* Possibly update the information on which we make
+ * scheduling decisions.
+ */
+ if (sched_hook_func) {
+ __schedule_lock++;
+ sched_hook_func();
+ __schedule_lock--;
+ }
+
__need_schedule = false;
best = NULL;