Merged
authorLaurent Bessard
Fri, 17 May 2013 20:58:34 +0200
changeset 1168 7838595559ba
parent 1160 e9e9d3193894 (diff)
parent 1167 a2f9b44c17c9 (current diff)
child 1169 53e4a2b775a7
Merged
--- a/py_ext/PythonFileCTNMixin.py	Fri May 17 20:56:15 2013 +0200
+++ b/py_ext/PythonFileCTNMixin.py	Fri May 17 20:58:34 2013 +0200
@@ -127,12 +127,11 @@
 long __%(name)s_wlock = 0;
 int __%(name)s_wbuffer_written = 0;
 void __SafeGetPLCGlob_%(name)s(IEC_%(IECtype)s *pvalue){
-    IEC_%(IECtype)s res;
     while(AtomicCompareExchange(&__%(name)s_rlock, 0, 1));
     *pvalue = __%(name)s_rbuffer;
     AtomicCompareExchange((long*)&__%(name)s_rlock, 1, 0);
 }
-__SafeSetPLCGlob_%(name)s(IEC_%(IECtype)s *value){
+void __SafeSetPLCGlob_%(name)s(IEC_%(IECtype)s *value){
     while(AtomicCompareExchange(&__%(name)s_wlock, 0, 1));
     __%(name)s_wbuffer = *value;
     __%(name)s_wbuffer_written = 1;