mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.479 (3f813947vLCvbxYLugd4rI8gd1R05Q)
sched.h, softirq.c, schedule.c, event.c, domain.c, process.c: Cleanups to new scheduler world.
This commit is contained in:
1 parent
922fddb035
commit
302f83aab8
6 files changed
+15
-19
No files matched your search
@@ -76,7 +76,7 @@ void startup_cpu_idle_loop(void)
|
||||
/* Just some sanity to ensure that the scheduler is set up okay. */
|
||||
ASSERT(current->domain == IDLE_DOMAIN_ID);
|
||||
(void)wake_up(current);
|
||||
schedule();
|
||||
__enter_scheduler();
|
||||
|
||||
/*
|
||||
* Declares CPU setup done to the boot processor.
|
||||
|
||||
+4
-4
@@ -151,7 +151,7 @@ void __kill_domain(struct task_struct *p)
|
||||
|
||||
if ( p == current )
|
||||
{
|
||||
schedule();
|
||||
__enter_scheduler();
|
||||
BUG(); /* never get here */
|
||||
}
|
||||
else
|
||||
@@ -196,9 +196,9 @@ long kill_other_domain(unsigned int dom, int force)
|
||||
|
||||
void stop_domain(void)
|
||||
{
|
||||
current -> state = TASK_SUSPENDED;
|
||||
clear_bit(_HYP_EVENT_STOP, &(current->hyp_events));
|
||||
schedule ();
|
||||
set_current_state(TASK_SUSPENDED);
|
||||
clear_bit(_HYP_EVENT_STOP, ¤t->hyp_events);
|
||||
__enter_scheduler();
|
||||
}
|
||||
|
||||
long stop_other_domain(unsigned int dom)
|
||||
|
||||
+1
-3
@@ -13,12 +13,10 @@
|
||||
|
||||
typedef void (*hyp_event_callback_fn_t)(void);
|
||||
|
||||
extern void schedule(void);
|
||||
|
||||
/* Ordering must match definitions of _HYP_EVENT_* in xeno/sched.h */
|
||||
static hyp_event_callback_fn_t event_call_fn[] =
|
||||
{
|
||||
schedule,
|
||||
__enter_scheduler,
|
||||
kill_domain,
|
||||
stop_domain
|
||||
};
|
||||
|
||||
@@ -201,7 +201,7 @@ long do_yield(void)
|
||||
{
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
current->warpback = 0; /* XXX should only do this when blocking */
|
||||
schedule();
|
||||
__enter_scheduler();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ void reschedule(struct task_struct *p)
|
||||
* i.e., the domain with lowest EVT.
|
||||
* The runqueue should be ordered by EVT so that is easy.
|
||||
****************************************************************************/
|
||||
asmlinkage void schedule(void)
|
||||
asmlinkage void __enter_scheduler(void)
|
||||
{
|
||||
struct task_struct *prev, *next, *next_prime, *p;
|
||||
struct list_head *tmp;
|
||||
|
||||
@@ -225,14 +225,9 @@ void tasklet_kill(struct tasklet_struct *t)
|
||||
{
|
||||
if (in_interrupt())
|
||||
printk("Attempt to kill tasklet from interrupt\n");
|
||||
|
||||
while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) {
|
||||
set_current_state(TASK_RUNNING);
|
||||
do {
|
||||
current->policy |= SCHED_YIELD;
|
||||
schedule();
|
||||
} while (test_bit(TASKLET_STATE_SCHED, &t->state));
|
||||
}
|
||||
while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state))
|
||||
while (test_bit(TASKLET_STATE_SCHED, &t->state))
|
||||
do_softirq();
|
||||
tasklet_unlock_wait(t);
|
||||
clear_bit(TASKLET_STATE_SCHED, &t->state);
|
||||
}
|
||||
|
||||
@@ -276,7 +276,10 @@ void init_idle_task(void);
|
||||
int wake_up(struct task_struct *p);
|
||||
long do_yield(void);
|
||||
void reschedule(struct task_struct *p);
|
||||
asmlinkage void schedule(void);
|
||||
|
||||
/* NB. Limited entry in Xen. Not for arbitrary use! */
|
||||
asmlinkage void __enter_scheduler(void);
|
||||
#define schedule() __schedule_not_callable_in_xen()
|
||||
|
||||
/* A compatibility hack for Linux drivers. */
|
||||
#define MAX_SCHEDULE_TIMEOUT 0UL
|
||||
|
||||