equal
deleted
inserted
replaced
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2 <CFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="cext_xsd.xsd"> |
2 <CodeFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="codefile.xsd"> |
3 <includes> |
3 <includes> |
4 <![CDATA[#include "stdio.h"]]> |
4 <![CDATA[#include "stdio.h"]]> |
5 </includes> |
5 </includes> |
6 <variables> |
6 <variables> |
7 <variable name="TestInput" type="SINT" class="input"/> |
7 <variable name="TestInput" type="SINT" initial="0"/> |
8 <variable name="TestOutput" type="SINT" class="output"/> |
8 <variable name="TestOutput" type="SINT"/> |
9 </variables> |
9 </variables> |
10 <globals> |
10 <globals> |
11 <![CDATA[volatile long Lock=0; |
11 <![CDATA[volatile long Lock=0; |
12 volatile char PtoC=1,CtoP=2; |
12 volatile char PtoC=1,CtoP=2; |
13 |
13 |
60 <![CDATA[if(!AtomicCompareExchange((long*)&Lock, 0, 1)){ |
60 <![CDATA[if(!AtomicCompareExchange((long*)&Lock, 0, 1)){ |
61 TestInput = CtoP + PtoC + TestOutput; |
61 TestInput = CtoP + PtoC + TestOutput; |
62 AtomicCompareExchange((long*)&Lock, 1, 0); |
62 AtomicCompareExchange((long*)&Lock, 1, 0); |
63 }]]> |
63 }]]> |
64 </publishFunction> |
64 </publishFunction> |
65 </CFile> |
65 </CodeFile> |