X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/b34a548a5dfd2f0b068fd835a4cd51680d851068..fb2dd0f20bd6264291dccb5e97609a23cae2fd1a:/lincan/include/can_sysdep.h diff --git a/lincan/include/can_sysdep.h b/lincan/include/can_sysdep.h index 1de1454..56cfc4e 100644 --- a/lincan/include/can_sysdep.h +++ b/lincan/include/can_sysdep.h @@ -121,7 +121,7 @@ #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 @@ -136,6 +136,14 @@ #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*/