Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 373 → Rev 369

/SPARTAN/trunk/src/main/main.c
35,8 → 35,10
#include <proc/scheduler.h>
#include <proc/thread.h>
#include <proc/task.h>
#include <mm/vm.h>
#include <main/kinit.h>
#include <cpu.h>
#include <mm/heap.h>
 
#ifdef __SMP__
#include <arch/smp/apic.h>
46,12 → 48,9
#include <smp/smp.h>
 
#include <arch/mm/memory_init.h>
#include <mm/heap.h>
#include <mm/frame.h>
#include <mm/page.h>
#include <mm/tlb.h>
#include <mm/vm.h>
 
#include <synch/waitq.h>
 
#include <arch/arch.h>
/SPARTAN/trunk/src/mm/frame.c
115,6 → 115,7
 
frame->refcount++;
list_remove(tmp); /* remove frame from free_head */
list_append(tmp, &zone->busy_head); /* append frame to busy_head */
zone->free_count--;
zone->busy_count++;
179,6 → 180,7
ASSERT(frame->refcount);
 
if (!--frame->refcount) {
list_remove(&frame->link); /* remove frame from busy_head */
list_append(&frame->link, &zone->free_head); /* append frame to free_head */
zone->free_count++;
zone->busy_count--;
193,7 → 195,7
/** Mark frame not free.
*
* Find respective frame structrue for supplied addr.
* Increment frame reference count and remove the frame structure from free list.
* Increment frame reference count and move the frame structure to busy list.
*
* @param addr Address of the frame to be marked. It must be a multiple of FRAME_SIZE.
*/
239,6 → 241,7
frame->refcount++;
 
list_remove(&frame->link); /* remove frame from free_head */
list_append(&frame->link, &zone->busy_head); /* append frame to busy_head */
zone->free_count--;
zone->busy_count++;
}
310,6 → 313,7
list_initialize(&z->free_head);
 
z->busy_count = 0;
list_initialize(&z->busy_head);
z->frames = (frame_t *) malloc(cnt * sizeof(frame_t));
if (!z->frames) {