Commit 01b4d19c authored by Pavel Vainerman's avatar Pavel Vainerman

minor fixes (add uniset_spin_lock)

parent b26d06b3
......@@ -220,7 +220,7 @@ void UniExchange::NetNodeInfo::update( IOController_i::ShortMapSeq_var& map, SMI
smap[i].id = map[i].id;
}
smap[i].val = map[i].value;
smap[i].val = map[i].value;
try
{
......@@ -256,9 +256,12 @@ IOController_i::ShortMapSeq* UniExchange::getSensors()
for( SList::iterator it=mymap.begin(); it!=mymap.end(); ++it )
{
IOController_i::ShortMap m;
m.id = it->id;
m.value = it->val;
m.type = it->type;
{
uniset_spin_lock lock(it->val_lock,30);
m.id = it->id;
m.value = it->val;
m.type = it->type;
}
(*res)[i++] = m;
}
......@@ -271,6 +274,7 @@ void UniExchange::updateLocalData()
{
try
{
uniset_spin_lock lock(it->val_lock,30);
if( it->type == UniversalIO::DigitalInput ||
it->type == UniversalIO::DigitalOutput )
{
......
......@@ -56,6 +56,7 @@ class UniExchange:
long val;
long id;
UniversalIO::IOTypes type;
UniSetTypes::uniset_spin_mutex val_lock;
};
typedef std::vector<SInfo> SList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment