Changeset c842f04 in mainline for include/synch/spinlock.h


Ignore:
Timestamp:
2005-09-01T09:19:56Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e3b9572
Parents:
f9447155
Message:

Preemption work.
Instrument spinlock functions with preemption_disable() and preemption_enable() calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/synch/spinlock.h

    rf9447155 rc842f04  
    3232#include <arch/types.h>
    3333#include <typedefs.h>
     34#include <preemption.h>
    3435
    3536#ifdef __SMP__
     
    4950
    5051#define spinlock_initialize(x)
    51 #define spinlock_lock(x)
    52 #define spinlock_trylock(x) 1
    53 #define spinlock_unlock(x)
     52#define spinlock_lock(x)                preemption_disable()
     53#define spinlock_trylock(x)             (preemption_disable(), 1)
     54#define spinlock_unlock(x)              preemption_enable()
    5455
    5556#endif
Note: See TracChangeset for help on using the changeset viewer.