diff options
author | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2004-05-21 10:57:45 +0000 |
---|---|---|
committer | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2004-05-21 10:57:45 +0000 |
commit | fdb0b778782b5a8606b37689bbfbe004fdac2722 (patch) | |
tree | 7a5a25c0095e230d923f06865c5738d895cfc177 /xen | |
parent | b1ea6b00eff67474d590ab60e75535973cacb6ed (diff) | |
parent | 68daa78a0de26bd75ae39d91adf1b93513ab1624 (diff) | |
download | xen-fdb0b778782b5a8606b37689bbfbe004fdac2722.tar.gz xen-fdb0b778782b5a8606b37689bbfbe004fdac2722.tar.bz2 xen-fdb0b778782b5a8606b37689bbfbe004fdac2722.zip |
bitkeeper revision 1.920 (40ade0a9XXfWXJDrdcZG4y_gJyXZZw)
Merge labyrinth.cl.cam.ac.uk:/auto/homes/maw48/xeno-schedfix.bk
into labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xeno.bk
Diffstat (limited to 'xen')
-rw-r--r-- | xen/common/sched_bvt.c | 4 | ||||
-rw-r--r-- | xen/common/schedule.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/xen/common/sched_bvt.c b/xen/common/sched_bvt.c index a4b76b42f5..a3ac2c80bc 100644 --- a/xen/common/sched_bvt.c +++ b/xen/common/sched_bvt.c @@ -170,6 +170,7 @@ void bvt_wake_up(struct task_struct *p) static void bvt_do_block(struct task_struct *p) { BVT_INFO(p)->warpback = 0; + __del_from_runqueue(p); } /* Control the scheduler. */ @@ -276,7 +277,8 @@ static task_slice_t bvt_do_schedule(s_time_t now) __calc_evt(prev_inf); - __del_from_runqueue(prev); + if( __task_on_runqueue(prev)) + __del_from_runqueue(prev); if ( likely(prev->state == TASK_RUNNING) ) __add_to_runqueue_tail(prev); diff --git a/xen/common/schedule.c b/xen/common/schedule.c index b5e4219d6c..6fbaf56a9a 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -224,6 +224,7 @@ long do_block(void) ASSERT(current->domain != IDLE_DOMAIN_ID); current->shared_info->vcpu_data[0].evtchn_upcall_mask = 0; current->state = TASK_INTERRUPTIBLE; + SCHED_OP(do_block, current); TRACE_2D(TRC_SCHED_BLOCK, current->domain, current); __enter_scheduler(); return 0; @@ -461,9 +462,10 @@ asmlinkage void __enter_scheduler(void) { /* this check is needed to avoid a race condition */ if ( signal_pending(prev) ) + { prev->state = TASK_RUNNING; - else - SCHED_OP(do_block, prev); + SCHED_OP(wake_up, prev); + } } prev->cpu_time += now - prev->lastschd; |