targets/Linux/plc_Linux_main.c
changeset 617 7c23fac40a2a
parent 614 eed1dcf311a1
child 876 179d5c455f29
equal deleted inserted replaced
616:b9271faec96e 617:7c23fac40a2a
   140 
   140 
   141 extern unsigned long __tick;
   141 extern unsigned long __tick;
   142 
   142 
   143 int WaitDebugData(unsigned long *tick)
   143 int WaitDebugData(unsigned long *tick)
   144 {
   144 {
       
   145     int res;
       
   146     /* Wait signal from PLC thread */
       
   147     res = pthread_mutex_lock(&debug_wait_mutex);
   145     *tick = __debug_tick;
   148     *tick = __debug_tick;
   146     /* Wait signal from PLC thread */
   149     return res;
   147     return pthread_mutex_lock(&debug_wait_mutex);
       
   148 }
   150 }
   149 
   151 
   150 /* Called by PLC thread when debug_publish finished
   152 /* Called by PLC thread when debug_publish finished
   151  * This is supposed to unlock debugger thread in WaitDebugData*/
   153  * This is supposed to unlock debugger thread in WaitDebugData*/
   152 void InitiateDebugTransfer()
   154 void InitiateDebugTransfer()