]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/c_can.c
LinCAN driver updated to work on Real-Time Preemption enabled kernel.
[lincan.git] / lincan / src / c_can.c
index ed3991c7c90fc2ba69198c0aee6a637929300d54..9929467bb479dc7fcb959fc76dacc544726dbddf 100644 (file)
 extern int stdmask;
 extern int extmask;
 
-can_spinlock_t c_can_spwlock = SPIN_LOCK_UNLOCKED;     // Spin lock for write operations
-can_spinlock_t c_can_sprlock = SPIN_LOCK_UNLOCKED;     // Spin lock for read operations
-can_spinlock_t c_can_if1lock = SPIN_LOCK_UNLOCKED;     // spin lock for the if1 register
-can_spinlock_t c_can_if2lock = SPIN_LOCK_UNLOCKED;     // spin lcok for the if2 register
+CAN_DEFINE_SPINLOCK(c_can_spwlock);    // Spin lock for write operations
+CAN_DEFINE_SPINLOCK(c_can_sprlock);    // Spin lock for read operations
+CAN_DEFINE_SPINLOCK(c_can_if1lock);    // spin lock for the if1 register
+CAN_DEFINE_SPINLOCK(c_can_if2lock);    // spin lcok for the if2 register
 
 /**
  * c_can_enable_configuration - enable chip configuration mode