Skip to content

Commit

Permalink
Fixed previous faulty correction.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Nemeth committed May 16, 2011
1 parent ca131e9 commit f375318
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions rtt/internal/ConnFactory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ namespace RTT
case ConnPolicy::LOCK_FREE:
data_object.reset( new base::DataObjectLockFree<T>(initial_value) );
break;
#else
case ConnPolicy::LOCK_FREE:
RTT::log(Warning) << "lock free connection policy is unavailable on this system, defaulting to LOCKED" << RTT::endlog();
#endif
case ConnPolicy::LOCKED:
data_object.reset( new base::DataObjectLocked<T>(initial_value) );
break;
case ConnPolicy::UNSYNC:
data_object.reset( new base::DataObjectUnSync<T>(initial_value) );
break;
Expand All @@ -134,14 +140,17 @@ namespace RTT
base::BufferInterface<T>* buffer_object = 0;
switch (policy.lock_policy)
{
case ConnPolicy::LOCKED:
buffer_object = new base::BufferLocked<T>(policy.size, initial_value);
break;
#ifndef OROBLD_OS_NO_ASM
case ConnPolicy::LOCK_FREE:
buffer_object = new base::BufferLockFree<T>(policy.size, initial_value);
break;
#else
case ConnPolicy::LOCK_FREE:
RTT::log(Warning) << "lock free connection policy is unavailable on this system, defaulting to LOCKED" << RTT::endlog();
#endif
case ConnPolicy::LOCKED:
buffer_object = new base::BufferLocked<T>(policy.size, initial_value);
break;
case ConnPolicy::UNSYNC:
buffer_object = new base::BufferUnSync<T>(policy.size, initial_value);
break;
Expand Down

0 comments on commit f375318

Please sign in to comment.