[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Ok, there is a bug where if you try to resume() a preempted task (vs a
suspended one) that it will try, but then it croaks because it thinks
it is a suspended task.  The attached patch is a hack, but will fix
the immediate problem for those who need this fix.

As a note for anybody who is interested in fixing this issue (and
greater ones), or at least as a note for posterity:

1) the suspend/resume stuff pre-dates preempting, so does not
   integrate (i.e. it does not call task_pause, but instead
   does its own black magic).  This is a problem because resume
   actually 'preempts' the current task and calls execute on the
   new task, then returns the task after the resumed one is finished.
   A possible behaviour would be to simply move the resumed task to
   the preempted list, or to move the current task to the preempted
   list and replace it with the resumed task (the latter is more work
   but probably the better way).
2) We should take close look in execute.c for every use of
   current_vm() and see if it should be using some form of preempting
   instead.

-Brandon