Subversion Repositories HelenOS

Rev

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

Rev 3343 Rev 3798
Line 378... Line 378...
378
{
378
{
379
    int priority;
379
    int priority;
380
    DEADLOCK_PROBE_INIT(p_joinwq);
380
    DEADLOCK_PROBE_INIT(p_joinwq);
381
 
381
 
382
    ASSERT(CPU != NULL);
382
    ASSERT(CPU != NULL);
383
   
383
 
384
    if (THREAD) {
384
    if (THREAD) {
385
        /* must be run after the switch to scheduler stack */
385
        /* must be run after the switch to scheduler stack */
386
        after_thread_ran();
386
        after_thread_ran();
387
 
387
 
388
        switch (THREAD->state) {
388
        switch (THREAD->state) {
Line 458... Line 458...
458
 
458
 
459
        THREAD = NULL;
459
        THREAD = NULL;
460
    }
460
    }
461
 
461
 
462
    THREAD = find_best_thread();
462
    THREAD = find_best_thread();
463
   
463
 
464
    spinlock_lock(&THREAD->lock);
464
    spinlock_lock(&THREAD->lock);
465
    priority = THREAD->priority;
465
    priority = THREAD->priority;
466
    spinlock_unlock(&THREAD->lock);
466
    spinlock_unlock(&THREAD->lock);
467
 
467
 
468
    relink_rq(priority);       
468
    relink_rq(priority);