master/master.h
branchstable-1.4
changeset 1644 8174d9b2adaf
parent 1198 be606e9caba4
child 1648 3e46fbb7eb1d
equal deleted inserted replaced
1643:cf5a5c511408 1644:8174d9b2adaf
    42 #define __EC_MASTER_H__
    42 #define __EC_MASTER_H__
    43 
    43 
    44 #include <linux/list.h>
    44 #include <linux/list.h>
    45 #include <linux/timer.h>
    45 #include <linux/timer.h>
    46 #include <linux/wait.h>
    46 #include <linux/wait.h>
       
    47 #include <linux/kthread.h>
    47 #include <asm/semaphore.h>
    48 #include <asm/semaphore.h>
    48 
    49 
    49 #include "device.h"
    50 #include "device.h"
    50 #include "domain.h"
    51 #include "domain.h"
    51 #include "fsm_master.h"
    52 #include "fsm_master.h"
   132     int debug_level; /**< Master debug level. */
   133     int debug_level; /**< Master debug level. */
   133     ec_stats_t stats; /**< Cyclic statistics. */
   134     ec_stats_t stats; /**< Cyclic statistics. */
   134     unsigned int frames_timed_out; /**< There were frame timeouts in the last
   135     unsigned int frames_timed_out; /**< There were frame timeouts in the last
   135                                      call to ecrt_master_receive(). */
   136                                      call to ecrt_master_receive(). */
   136 
   137 
   137     int thread_id; /**< Master thread PID. */
   138     struct task_struct *thread; /**< Master thread. */
   138     struct completion thread_can_terminate; /**< Thread termination completion
       
   139                                               object. When stopping the
       
   140                                               thread, it must be assured, that
       
   141                                               it 'hears' a SIGTERM, therefore
       
   142                                               the allow_singal() function must
       
   143                                               have been called.
       
   144                                              */
       
   145     struct completion thread_exit; /**< Thread completion object. */
       
   146 
   139 
   147 #ifdef EC_EOE
   140 #ifdef EC_EOE
   148     struct timer_list eoe_timer; /**< EoE timer object. */
   141     struct timer_list eoe_timer; /**< EoE timer object. */
   149     unsigned int eoe_running; /**< \a True, if EoE processing is active. */
   142     unsigned int eoe_running; /**< \a True, if EoE processing is active. */
   150     struct list_head eoe_handlers; /**< Ethernet-over-EtherCAT handlers. */
   143     struct list_head eoe_handlers; /**< Ethernet-over-EtherCAT handlers. */