sam7fc/include/rtos/spinlock.h

20 lines
387 B
C
Raw Normal View History

2008-02-23 00:25:31 +01:00
#ifndef _SPINLOCK_H_
#define _SPINLOCK_H_
#include <stdint.h>
struct spinlock {
uint8_t locked;
uint8_t priority_unlocked;
};
void isr_spinlock_lock(struct spinlock *lock);
2008-02-23 00:25:31 +01:00
void spinlock_lock(struct spinlock *lock);
void isr_spinlock_unlock(struct spinlock *lock);
2008-02-23 00:25:31 +01:00
void spinlock_unlock(struct spinlock *lock);
void spinlock_init(struct spinlock *lock);
2008-02-23 00:25:31 +01:00
#endif /* _SPINLOCK_H_ */