# HG changeset patch # User Florian Pose # Date 1213275905 0 # Node ID 90db4c3de57b067565d59dc21d604e810b284b2f # Parent 5af7ab9a98b12d06b1fa4d9e5607e0bd79932a00 Added a few debugging messages. diff -r 5af7ab9a98b1 -r 90db4c3de57b master/master.c --- a/master/master.c Thu Jun 12 13:03:50 2008 +0000 +++ b/master/master.c Thu Jun 12 13:05:05 2008 +0000 @@ -325,6 +325,9 @@ return; } + if (master->debug_level) + EC_DBG("Stopping master thread.\n"); + kill_proc(master->thread_id, SIGTERM, 1); wait_for_completion(&master->thread_exit); EC_INFO("Master thread exited.\n"); @@ -347,6 +350,9 @@ master->release_cb = ec_master_release_cb; master->cb_data = master; + if (master->debug_level) + EC_DBG("ORPHANED -> IDLE.\n"); + master->mode = EC_MASTER_MODE_IDLE; if (ec_master_thread_start(master, ec_master_idle_thread)) { master->mode = EC_MASTER_MODE_ORPHANED; @@ -362,6 +368,9 @@ */ void ec_master_leave_idle_mode(ec_master_t *master /**< EtherCAT master */) { + if (master->debug_level) + EC_DBG("IDLE -> ORPHANED.\n"); + master->mode = EC_MASTER_MODE_ORPHANED; #ifdef EC_EOE @@ -382,6 +391,9 @@ ec_eoe_t *eoe; #endif + if (master->debug_level) + EC_DBG("IDLE -> OPERATION.\n"); + down(&master->config_sem); master->allow_config = 0; // temporarily disable slave configuration if (master->config_busy) { @@ -458,6 +470,9 @@ ec_eoe_t *eoe; #endif + if (master->debug_level) + EC_DBG("OPERATION -> IDLE.\n"); + master->mode = EC_MASTER_MODE_IDLE; #ifdef EC_EOE