]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/include/can_sysdep.h
Added full RT-Linux POSIX interface to LinCAN driver, needs preparation of RT tests.
[lincan.git] / lincan / include / can_sysdep.h
index 1de145449c9fd3237eabe20185a4d46bc302dbac..56cfc4ed2ffcfbf20cfda693b460770ccbbd18a0 100644 (file)
 #else /*CAN_WITH_RTL*/
 
 #define can_spinlock_t             rtl_spinlock_t
 #else /*CAN_WITH_RTL*/
 
 #define can_spinlock_t             rtl_spinlock_t
-#define can_spin_irqflags_t        unsigned long
+#define can_spin_irqflags_t        rtl_irqstate_t
 #define can_spin_lock              rtl_spin_lock
 #define can_spin_unlock            rtl_spin_unlock
 #define can_spin_lock_irqsave      rtl_spin_lock_irqsave
 #define can_spin_lock              rtl_spin_lock
 #define can_spin_unlock            rtl_spin_unlock
 #define can_spin_lock_irqsave      rtl_spin_lock_irqsave
 
 #define can_printk                 rtl_printf
 
 
 #define can_printk                 rtl_printf
 
+/*
+ * terrible hack to test rtl_file private_data concept, ugh !!!
+ * this would result in crash on architectures,  where 
+ * sizeof(int) < sizeof(void *)
+ */
+#define can_set_rtl_file_private_data(fptr, p) do{ fptr->f_minor=(long)(p); } while(0)
+#define can_get_rtl_file_private_data(fptr) ((void*)((fptr)->f_minor))
+
 #endif /*CAN_WITH_RTL*/
 
 #endif /*_CAN_SYSDEP_H*/
 #endif /*CAN_WITH_RTL*/
 
 #endif /*_CAN_SYSDEP_H*/