/SPARTAN/trunk/src/mm/vm.c |
---|
66,10 → 66,7 |
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/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,8 → 90,6 |
runq_t *r; |
int i, n; |
ASSERT(CPU != NULL); |
loop: |
cpu_priority_high(); |
149,7 → 147,7 |
CPU->nrdy--; |
spinlock_unlock(&CPU->lock); |
atomic_dec((int *) &nrdy); |
atomic_dec(&nrdy); |
r->n--; |
/* |
231,8 → 229,6 |
{ |
volatile pri_t pri; |
ASSERT(CPU != NULL); |
pri = cpu_priority_high(); |
if (haltstate) |
296,8 → 292,6 |
{ |
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((int *) &nrdy); |
atomic_inc(&nrdy); |
avg = nrdy / config.cpu_active; |
spinlock_lock(&cpu->lock); |
/SPARTAN/trunk/src/lib/func.c |
---|
44,10 → 44,7 |
{ |
haltstate = 1; |
cpu_priority_high(); |
if (CPU) |
printf("cpu%d: halted\n", CPU->id); |
else |
printf("cpu: halted\n"); |
printf("cpu%d: halted\n", CPU->id); |
cpu_halt(); |
} |