+#ifdef CAN_WITH_RTL
+static inline
+void canqueue_wake_chip_worker(struct canque_ends_t *qends, struct canchip_t *chip, struct msgobj_t *obj)
+{
+ if(qends->endinfo.chipinfo.worker_thread){
+ can_msgobj_set_fl(obj,WORKER_WAKE);
+ pthread_kill(qends->endinfo.chipinfo.worker_thread,RTL_SIGNAL_WAKEUP);
+ rtl_schedule();
+ } else {
+ set_bit(MSGOBJ_TX_REQUEST_b,&chip->pend_flags);
+ if(chip->worker_thread) {
+ set_bit(MSGOBJ_WORKER_WAKE_b,&chip->pend_flags);
+ pthread_kill(chip->worker_thread,RTL_SIGNAL_WAKEUP);
+ rtl_schedule();
+ }
+ }
+}
+
+#endif /*CAN_WITH_RTL*/
+
+
+/**
+ * canqueue_notify_chip - notification callback handler for CAN chips ends of queues
+ * @qends: pointer to the callback side ends structure
+ * @qedge: edge which invoked notification
+ * @what: notification type
+ *
+ * This function has to deal with more possible cases. It can be called from
+ * the kernel or interrupt context for Linux only compilation of driver.
+ * The function can be called from kernel context or RT-Linux thread context
+ * for mixed mode Linux/RT-Linux compilation.
+ */