targets/Linux/plc_Linux_main.c
changeset 483 bc26c42d2eec
parent 462 274e83a5534e
child 485 8b2da4b9d408
equal deleted inserted replaced
482:7c83eb6a55bd 483:bc26c42d2eec
   109     if (pthread_mutex_trylock(&debug_mutex) == 0){
   109     if (pthread_mutex_trylock(&debug_mutex) == 0){
   110         /* Only enter if debug active */
   110         /* Only enter if debug active */
   111         if(__DEBUG){
   111         if(__DEBUG){
   112             return 1;
   112             return 1;
   113         }
   113         }
       
   114         pthread_mutex_unlock(&debug_mutex);
   114     }
   115     }
   115     pthread_mutex_unlock(&debug_mutex);
       
   116     return 0;
   116     return 0;
   117 }
   117 }
   118 
   118 
   119 void LeaveDebugSection(void)
   119 void LeaveDebugSection(void)
   120 {
   120 {
   125 {
   125 {
   126     /* Stop the PLC */
   126     /* Stop the PLC */
   127     PLC_SetTimer(0,0);
   127     PLC_SetTimer(0,0);
   128     timer_delete (PLC_timer);
   128     timer_delete (PLC_timer);
   129     __cleanup();
   129     __cleanup();
   130     __debug_tick = -1;
       
   131     pthread_mutex_unlock(&debug_mutex);
       
   132     pthread_mutex_unlock(&debug_wait_mutex);
       
   133     pthread_mutex_destroy(&debug_wait_mutex);
   130     pthread_mutex_destroy(&debug_wait_mutex);
   134     pthread_mutex_unlock(&python_wait_mutex);
   131     pthread_mutex_destroy(&debug_mutex);
   135     pthread_mutex_destroy(&python_wait_mutex);
   132     pthread_mutex_destroy(&python_wait_mutex);
       
   133     pthread_mutex_destroy(&python_mutex);
   136     return 0;
   134     return 0;
   137 }
   135 }
   138 
   136 
   139 extern unsigned long __tick;
   137 extern unsigned long __tick;
   140 
   138 
   196 
   194 
   197 void LockPython(void)
   195 void LockPython(void)
   198 {
   196 {
   199     pthread_mutex_lock(&python_mutex);
   197     pthread_mutex_lock(&python_mutex);
   200 }
   198 }
       
   199 
       
   200 void Retain(unsigned int offset, unsigned int count, void *p)
       
   201 {
       
   202 }
       
   203 
       
   204 void Remind(unsigned int offset, unsigned int count, void *p)
       
   205 {
       
   206 }