Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 226 → Rev 227

/SPARTAN/trunk/include/proc/scheduler.h
43,7 → 43,7
int n;
};
 
extern volatile int nrdy;
extern volatile count_t nrdy;
 
static thread_t *find_best_thread(void);
static void relink_rq(int start);
/SPARTAN/trunk/src/proc/scheduler.c
46,11 → 46,11
#include <print.h>
#include <mm/frame.h>
#include <mm/heap.h>
#include <debug.h>
 
volatile count_t nrdy;
 
volatile int nrdy;
 
 
/** Take actions before new thread runs
*
* Perform actions that need to be
90,6 → 90,8
runq_t *r;
int i, n;
 
ASSERT(CPU != NULL);
 
loop:
cpu_priority_high();
 
147,7 → 149,7
CPU->nrdy--;
spinlock_unlock(&CPU->lock);
 
atomic_dec(&nrdy);
atomic_dec((int *) &nrdy);
r->n--;
 
/*
229,6 → 231,8
{
volatile pri_t pri;
 
ASSERT(CPU != NULL);
 
pri = cpu_priority_high();
 
if (haltstate)
292,6 → 296,8
{
int priority;
 
ASSERT(CPU != NULL);
 
if (THREAD) {
switch (THREAD->state) {
case Running:
/SPARTAN/trunk/src/proc/thread.c
136,7 → 136,7
r->n++;
spinlock_unlock(&r->lock);
 
atomic_inc(&nrdy);
atomic_inc((int *) &nrdy);
avg = nrdy / config.cpu_active;
 
spinlock_lock(&cpu->lock);
/SPARTAN/trunk/src/lib/func.c
44,7 → 44,10
{
haltstate = 1;
cpu_priority_high();
printf("cpu%d: halted\n", CPU->id);
if (CPU)
printf("cpu%d: halted\n", CPU->id);
else
printf("cpu: halted\n");
cpu_halt();
}
 
/SPARTAN/trunk/src/mm/vm.c
66,7 → 66,10
src_ptl0 = (pte_t *) PA2KA((__address) GET_PTL0_ADDRESS());
dst_ptl0 = (pte_t *) frame_alloc(FRAME_KA | FRAME_PANIC);
 
/* TODO: in theory, it should be only necessary to copy kernel address space... */
memcpy((void *)PA2KA((__address) dst_ptl0), (void *)GET_PTL0_ADDRESS() , PAGE_SIZE);
 
m->ptl0 = (pte_t *) KA2PA((__address) dst_ptl0);
}
}
/SPARTAN/trunk/arch/mips/src/exception.c
32,6 → 32,7
#include <arch/cp0.h>
#include <arch/types.h>
#include <arch.h>
#include <debug.h>
 
void exception(void)
{
40,6 → 41,8
__u32 epc_shift = 0;
pri_t pri;
 
ASSERT(CPU != NULL);
 
/*
* NOTE ON OPERATION ORDERING
*