]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/include/main.h
LinCAN can be compiled in mode with RT-Linux chip worker threads now.
[lincan.git] / lincan / include / main.h
index 4bb0e0e500b0ae9e3cb3abb06f55ced206239e3d..4d42d4df0624417dff0d5bb8d9f9292ffe044882 100644 (file)
 #include "./can_queue.h"
 
 #ifdef CAN_DEBUG
-       #define DEBUGMSG(fmt,args...) printk(KERN_ERR "can.o (debug): " fmt,\
+       #define DEBUGMSG(fmt,args...) can_printk(KERN_ERR "can.o (debug): " fmt,\
        ##args)
 #else
        #define DEBUGMSG(fmt,args...)
 #endif
 
-#define CANMSG(fmt,args...) printk(KERN_ERR "can.o: " fmt,##args)
+#define CANMSG(fmt,args...) can_printk(KERN_ERR "can.o: " fmt,##args)
 
 
 /**
@@ -152,6 +152,12 @@ struct chip_t {
        struct candevice_t *hostdevice;
        
        int max_objects;        /* 1 for sja1000, 15 for i82527 */
+
+    #ifdef CAN_WITH_RTL
+       pthread_t worker_thread;
+       rtl_spinlock_t rtl_lock;
+       unsigned long pend_flags;
+    #endif /*CAN_WITH_RTL*/
 };
 
 /**
@@ -179,7 +185,7 @@ struct msgobj_t {
        unsigned long obj_base_addr;
        unsigned int minor;     /* associated device minor number  */
        unsigned int object;    /* object number in chip_t +1 for debug printk */
-       unsigned long flags; 
+       unsigned long obj_flags; 
        int ret;
 
        struct canque_ends_t *qends;
@@ -297,7 +303,7 @@ struct chipspecops_t {
                                                        unsigned short btr1);
        int (*start_chip)(struct chip_t *chip);
        int (*stop_chip)(struct chip_t *chip);
-       irqreturn_t (*irq_handler)(int irq, void *dev_id, struct pt_regs *regs);
+       can_irqreturn_t (*irq_handler)(int irq, void *dev_id, struct pt_regs *regs);
 };
 
 struct mem_addr {