Subversion Repositories HelenOS-historic

Rev

Rev 192 | Rev 198 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 192 Rev 195
Line 41... Line 41...
41
#include <typedefs.h>
41
#include <typedefs.h>
42
#include <mm/page.h>
42
#include <mm/page.h>
43
#include <synch/spinlock.h>
43
#include <synch/spinlock.h>
44
#include <arch/faddr.h>
44
#include <arch/faddr.h>
45
#include <arch/atomic.h>
45
#include <arch/atomic.h>
-
 
46
#include <print.h>
-
 
47
#include <mm/frame.h>
-
 
48
#include <mm/heap.h>
-
 
49
 
46
 
50
 
47
volatile int nrdy;
51
volatile int nrdy;
48
 
52
 
49
 
53
 
50
/** Take actions before new thread runs
54
/** Take actions before new thread runs
Line 355... Line 359...
355
            panic("tid%d: unexpected state %s\n", THREAD->tid, thread_states[THREAD->state]);
359
            panic("tid%d: unexpected state %s\n", THREAD->tid, thread_states[THREAD->state]);
356
            break;
360
            break;
357
        }
361
        }
358
        THREAD = NULL;
362
        THREAD = NULL;
359
    }
363
    }
360
 
364
    printf("*0*");
361
    THREAD = find_best_thread();
365
    THREAD = find_best_thread();
-
 
366
    printf("*1*");
362
   
367
   
363
    spinlock_lock(&THREAD->lock);
368
    spinlock_lock(&THREAD->lock);
364
    priority = THREAD->pri;
369
    priority = THREAD->pri;
365
    spinlock_unlock(&THREAD->lock);
370
    spinlock_unlock(&THREAD->lock);
366
 
371