targets/Linux/plc_Linux_main.c
changeset 518 8e61b0066859
parent 485 8b2da4b9d408
child 522 6bd373f930f2
equal deleted inserted replaced
517:6da1617a7645 518:8e61b0066859
     8 #include <signal.h>
     8 #include <signal.h>
     9 #include <stdlib.h>
     9 #include <stdlib.h>
    10 #include <pthread.h>
    10 #include <pthread.h>
    11 
    11 
    12 /* provided by POUS.C */
    12 /* provided by POUS.C */
    13 extern int common_ticktime__;
    13 extern unsigned long long common_ticktime__;
    14 
    14 
    15 long AtomicCompareExchange(long* atomicvar,long compared, long exchange)
    15 long AtomicCompareExchange(long* atomicvar,long compared, long exchange)
    16 {
    16 {
    17     return __sync_val_compare_and_swap(atomicvar, compared, exchange);
    17     return __sync_val_compare_and_swap(atomicvar, compared, exchange);
    18 }
    18 }
    28     __run();
    28     __run();
    29 }
    29 }
    30 
    30 
    31 timer_t PLC_timer;
    31 timer_t PLC_timer;
    32 
    32 
    33 void PLC_SetTimer(long long next, long long period)
    33 void PLC_SetTimer(unsigned long long next, unsigned long long period)
    34 {
    34 {
    35     struct itimerspec timerValues;
    35     struct itimerspec timerValues;
    36 	/*
    36 	/*
    37 	printf("SetTimer(%lld,%lld)\n",next, period);
    37 	printf("SetTimer(%lld,%lld)\n",next, period);
    38 	*/
    38 	*/