]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/can_quertl.c
LinCAN sources go through big white-space cleanup.
[lincan.git] / lincan / src / can_quertl.c
index 0bc83c0e9eac6ca2c897b91c94a4e275576fb6bf..50d60819feea15d5d37096297637bd7a3c9eea88 100644 (file)
@@ -39,8 +39,8 @@
 
 #include <rtl_malloc.h>
 
-/* 
- * Modifies Tx message processing 
+/*
+ * Modifies Tx message processing
  *  0 .. local message processing disabled
  *  1 .. local messages disabled by default but can be enabled by canque_set_filt
  *  2 .. local messages enabled by default, can be disabled by canque_set_filt
@@ -65,7 +65,7 @@ canqueue_rtl2lin_handler(int irq, void *ignore, struct pt_regs *ignoreregs)
        unsigned pending_inops;
        unsigned pending_outops;
        int i;
-       
+
        can_spin_lock_irqsave (&canque_pending_edges_lock, flags);
 
        while(!list_empty(&canque_pending_edges_list)){
@@ -94,7 +94,7 @@ canqueue_rtl2lin_handler(int irq, void *ignore, struct pt_regs *ignoreregs)
                        if(pending_inops&1)
                                canque_notify_inends(qedge,i);
                }
-               
+
                canque_edge_decref(qedge);
                can_spin_lock_irqsave (&canque_pending_edges_lock, flags);
        }
@@ -109,7 +109,7 @@ canqueue_rtl2lin_handler(int irq, void *ignore, struct pt_regs *ignoreregs)
 
 
 /**
- * canqueue_rtl2lin_check_and_pend - postpones edge notification if called from RT-Linux 
+ * canqueue_rtl2lin_check_and_pend - postpones edge notification if called from RT-Linux
  * @qends: notification target ends
  * @qedge: edge delivering notification
  * @what:  notification type
@@ -126,7 +126,7 @@ int canqueue_rtl2lin_check_and_pend(struct canque_ends_t *qends,
        if(rtl_rt_system_is_idle()) return 0;
 
        can_spin_lock_irqsave (&canque_pending_edges_lock, flags);
-       
+
        if(what>CANQUE_PENDOPS_LIMIT) what=CANQUE_PENDOPS_LIMIT;
 
        if(qends == qedge->inends) {
@@ -142,7 +142,7 @@ int canqueue_rtl2lin_check_and_pend(struct canque_ends_t *qends,
        }
 
        can_spin_unlock_irqrestore (&canque_pending_edges_lock, flags);
-       
+
        return 1;
 
 }
@@ -169,7 +169,7 @@ int canque_get_inslot4id_wait_rtl(struct canque_ends_t *qends,
        int ret;
        unsigned old_age;
        rtl_sigset_t sigset;
-       
+
        old_age=atomic_read(&qends->endinfo.rtlinfo.rtl_writeq_age);
        while((ret=canque_get_inslot4id(qends,qedgep,slotp,cmd,id,prio))==-1){
                rtl_sigemptyset(&sigset);
@@ -181,7 +181,7 @@ int canque_get_inslot4id_wait_rtl(struct canque_ends_t *qends,
                        return -1;
                old_age=atomic_read(&qends->endinfo.rtlinfo.rtl_writeq_age);
        }
-       
+
        return ret;
 }
 
@@ -205,7 +205,7 @@ int canque_get_outslot_wait_rtl(struct canque_ends_t *qends,
        int ret;
        unsigned old_age;
        rtl_sigset_t sigset;
-       
+
        old_age=atomic_read(&qends->endinfo.rtlinfo.rtl_readq_age);
        while((ret=canque_test_outslot(qends,qedgep,slotp))==-1){
                rtl_sigemptyset(&sigset);
@@ -236,7 +236,7 @@ int canque_sync_wait_rtl(struct canque_ends_t *qends, struct canque_edge_t *qedg
        int ret;
        unsigned old_age;
        rtl_sigset_t sigset;
-       
+
        old_age=atomic_read(&qends->endinfo.rtlinfo.rtl_emptyq_age);
        while(!(ret=canque_fifo_test_fl(&qedge->fifo,EMPTY)?1:0)){
                rtl_sigemptyset(&sigset);
@@ -248,7 +248,7 @@ int canque_sync_wait_rtl(struct canque_ends_t *qends, struct canque_edge_t *qedg
                        return -1;
                old_age=atomic_read(&qends->endinfo.rtlinfo.rtl_emptyq_age);
        }
-       
+
        return ret;
 }
 
@@ -332,13 +332,13 @@ void canque_ends_free_rtl(struct canque_ends_t *qends)
 /**
  * canqueue_notify_rtl - notification callback handler for Linux userspace clients
  * @qends: pointer to the callback side ends structure
- * @qedge: edge which invoked notification 
+ * @qedge: edge which invoked notification
  * @what: notification type
  */
 void canqueue_notify_rtl(struct canque_ends_t *qends, struct canque_edge_t *qedge, int what)
 {
        rtl_irqstate_t flags;
-       
+
        switch(what){
                case CANQUEUE_NOTIFY_EMPTY:
                        rtl_spin_lock_irqsave(&qends->endinfo.rtlinfo.rtl_lock, flags);
@@ -397,7 +397,7 @@ int canqueue_ends_init_rtl(struct canque_ends_t *qends)
        rtl_wait_init(&(qends->endinfo.rtlinfo.rtl_readq));
        rtl_wait_init(&(qends->endinfo.rtlinfo.rtl_writeq));
        rtl_wait_init(&(qends->endinfo.rtlinfo.rtl_emptyq));
-       
+
        qends->notify=canqueue_notify_rtl;
        qends->endinfo.rtlinfo.pend_flags=0;
        return 0;
@@ -422,7 +422,7 @@ int canqueue_ends_dispose_rtl(struct canque_ends_t *qends, int sync)
        /*Wait for sending of all pending messages in the output FIFOs*/
        /*if(sync)
                canqueue_ends_sync_all_rtl(qends);*/
-       
+
        /* Finish or kill all outgoing edges listed in inends */
        delayed=canqueue_ends_kill_inlist(qends, 1);
        /* Kill all incoming edges listed in outends */