Fixed io_sem usage in queue_external_datagrams().
--- a/master/master.c Thu Dec 06 17:54:23 2012 +0100
+++ b/master/master.c Thu Dec 06 18:11:11 2012 +0100
@@ -847,6 +847,7 @@
list_for_each_entry(queued_datagram, &master->external_datagram_queue,
queue) {
if (queued_datagram == datagram) {
+ up(&master->io_sem);
datagram->state = EC_DATAGRAM_QUEUED;
return;
}
@@ -864,8 +865,9 @@
#endif
datagram->jiffies_sent = jiffies;
+ up(&master->io_sem);
+
master->fsm.idle = 0;
- up(&master->io_sem);
}
/*****************************************************************************/
@@ -1478,8 +1480,8 @@
up(&master->master_sem);
- // inject datagrams (let the rt thread queue them, see
- // ecrt_master_send)
+ // Inject datagrams (let the RT thread queue them, see
+ // ecrt_master_send())
if (fsm_exec) {
master->injection_seq_fsm++;
}
@@ -2280,7 +2282,7 @@
ec_device_index_t dev_idx;
if (master->injection_seq_rt != master->injection_seq_fsm) {
- // inject datagrams produced by master and slave FSMs
+ // inject datagrams produced by master FSM
ec_master_queue_datagram(master, &master->fsm_datagram);
master->injection_seq_rt = master->injection_seq_fsm;
}