sam7fc/include/rtos/spinlock.h

20 lines
387 B
C

#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);
void spinlock_lock(struct spinlock *lock);
void isr_spinlock_unlock(struct spinlock *lock);
void spinlock_unlock(struct spinlock *lock);
void spinlock_init(struct spinlock *lock);
#endif /* _SPINLOCK_H_ */