Changeset e3f41b6 in mainline for src/proc/thread.c


Ignore:
Timestamp:
2005-06-06T20:01:57Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b0bf501
Parents:
d47f0e1
Message:

Code cleanup in scheduler.c thread.c - removed unnecessary spinlock.
atomic_inc, atomic_dec moved to arch/atomic.h instead of arch/smp/atomic.h,
advisable to use even in non-smp mode.
Fixed atomic_inc, atomic_dec in mips architecture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/proc/thread.c

    rd47f0e1 re3f41b6  
    5050#include <smp/ipi.h>
    5151#include <arch/faddr.h>
     52#include <arch/atomic.h>
    5253
    5354char *thread_states[] = {"Invalid", "Running", "Sleeping", "Ready", "Entering", "Exiting"}; /**< Thread states */
     
    135136        spinlock_unlock(&r->lock);
    136137
    137         spinlock_lock(&nrdylock);
    138         avg = ++nrdy / config.cpu_active;
    139         spinlock_unlock(&nrdylock);
     138        atomic_inc(&nrdy);
     139        avg = nrdy / config.cpu_active;
    140140
    141141        spinlock_lock(&cpu->lock);
Note: See TracChangeset for help on using the changeset viewer.