WIP yet another namespace change. Now refer it from the test

This commit is contained in:
Fischlurch 2008-12-15 05:20:30 +01:00
parent 112cd475b7
commit 2512f04f3f
7 changed files with 17 additions and 18 deletions

View file

@ -60,7 +60,6 @@
namespace lib {
using boost::scoped_ptr;
using lumiera::Concurrency;
/**
* A pile of objects sharing common allocation and lifecycle.

View file

@ -34,14 +34,14 @@
*/
#ifndef LUMIERA_CONCURRENCY_H
#define LUMIERA_CONCURRENCY_H
#ifndef LIB_CONCURRENCY_H
#define LIB_CONCURRENCY_H
#include "include/nobugcfg.h"
#include "lib/util.hpp"
namespace lumiera {
namespace lib {
/**
* Facility for monitor object based locking.

View file

@ -139,7 +139,7 @@ namespace lumiera
struct Multithreaded
{
typedef volatile S VolatileType;
typedef lumiera::Concurrency::Lock<S> Lock;
typedef lib::Concurrency::Lock<S> Lock;
};

View file

@ -33,10 +33,10 @@
#include <vector>
namespace lumiera
{
namespace visitor
{
namespace lumiera {
namespace visitor {
using lib::Concurrency;
template<class TOOL> class Tag;

View file

@ -39,7 +39,7 @@ using boost::bind;
using util::for_each;
using lumiera::Singleton;
using lumiera::Concurrency;
using lib::Concurrency;
namespace asset

View file

@ -53,13 +53,12 @@
#include <boost/lambda/lambda.hpp>
namespace mobject
{
namespace session
{
namespace mobject {
namespace session {
using lumiera::P;
using lumiera::Query;
using lumiera::Concurrency;
using lib::Concurrency;
using std::tr1::weak_ptr;
using std::string;

View file

@ -55,6 +55,7 @@ namespace lib {
class Victim
: Concurrency
{
volatile long cnt_[NUM_COUNTERS];
volatile uint step_; ///< @note stored as instance variable
@ -62,7 +63,7 @@ namespace lib {
void
pause ()
{
//Lock guard (*this); // note recursive lock
Lock<Victim> guard (this); // note recursive lock
for ( uint i=0, lim=(rand() % MAX_PAUSE); i<lim; ++i);
}
@ -87,7 +88,7 @@ namespace lib {
void
inc (uint newStep)
{
//Lock guard (*this);
Lock<Victim> guard (this);
step_ = newStep;
incrementAll();
}
@ -95,7 +96,7 @@ namespace lib {
bool
belowLimit ()
{
//Lock guard (*this);
Lock<Victim> guard (this);
return cnt_[0] < MAX_SUM;
}