From: ppisa Date: Tue, 3 Feb 2009 03:06:55 +0000 (+0100) Subject: Eliminated busy loop in the USB can sources and thread priority increased. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/commitdiff_plain/cfa9e7afb7fe4e51b86b22be595dfe4c0615fa54?hp=1a157d7de03aaf7887a59fae6fbd62eec854aede Eliminated busy loop in the USB can sources and thread priority increased. Signed-off-by: ppisa --- diff --git a/lincan/src/usbcan.c b/lincan/src/usbcan.c index 01d2f90..429167c 100644 --- a/lincan/src/usbcan.c +++ b/lincan/src/usbcan.c @@ -1213,6 +1213,12 @@ int usbcan_kthread(void *data) INIT_LIST_HEAD(&dev->tx_pend_list); INIT_LIST_HEAD(&dev->tx_ready_list); + if (1) { + struct sched_param param = { .sched_priority = 1 }; + sched_setscheduler(current, SCHED_FIFO, ¶m); + } + + /* Prepare receive urbs */ for (i=0;iflags); + + mb(); + while(!list_empty(&dev->rx_ready_list)) { struct usbcan_message *m; m = list_first_entry(&dev->rx_ready_list, typeof(*m), list_node);