targets/Linux/plc_Linux_main.c
changeset 2173 976841968d74
parent 2171 d1536c271866
child 2820 d9b5303d43dc
equal deleted inserted replaced
2172:9fa5be79bb77 2173:976841968d74
    80 static pthread_mutex_t debug_wait_mutex = PTHREAD_MUTEX_INITIALIZER;
    80 static pthread_mutex_t debug_wait_mutex = PTHREAD_MUTEX_INITIALIZER;
    81 static pthread_mutex_t debug_mutex = PTHREAD_MUTEX_INITIALIZER;
    81 static pthread_mutex_t debug_mutex = PTHREAD_MUTEX_INITIALIZER;
    82 
    82 
    83 int PLC_shutdown = 0;
    83 int PLC_shutdown = 0;
    84 
    84 
       
    85 int ForceSaveRetainReq(void) {
       
    86     return PLC_shutdown;
       
    87 }
       
    88 
    85 void PLC_thread_proc(void *arg)
    89 void PLC_thread_proc(void *arg)
    86 {
    90 {
    87     while (!PLC_shutdown) {
    91     while (!PLC_shutdown) {
    88         sem_wait(&Run_PLC);
    92         sem_wait(&Run_PLC);
    89         __run();
    93         __run();
   229 
   233 
   230 void LockPython(void)
   234 void LockPython(void)
   231 {
   235 {
   232     pthread_mutex_lock(&python_mutex);
   236     pthread_mutex_lock(&python_mutex);
   233 }
   237 }
   234 
       
   235 #ifndef HAVE_RETAIN
       
   236 void InitRetain(void)
       
   237 {
       
   238 }
       
   239 
       
   240 void CleanupRetain(void)
       
   241 {
       
   242 }
       
   243 
       
   244 int CheckRetainBuffer(void)
       
   245 {
       
   246 	return 1;
       
   247 }
       
   248 
       
   249 void ValidateRetainBuffer(void)
       
   250 {
       
   251 }
       
   252 
       
   253 void InValidateRetainBuffer(void)
       
   254 {
       
   255 }
       
   256 
       
   257 void Retain(unsigned int offset, unsigned int count, void *p)
       
   258 {
       
   259 }
       
   260 
       
   261 void Remind(unsigned int offset, unsigned int count, void *p)
       
   262 {
       
   263 }
       
   264 #endif // !HAVE_RETAIN