rename user type to make the code more readable

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@699 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2006-09-08 11:08:59 +00:00
parent d5567eea60
commit cec102e2b0

View file

@ -25,7 +25,6 @@
using namespace Loki; using namespace Loki;
int g; int g;
int numThreads = 10; int numThreads = 10;
int loop = 5; int loop = 5;
@ -60,8 +59,8 @@ struct A
} }
}; };
typedef Loki::LockingPtr<A,LOKI_DEFAULT_MUTEX,DontPropagateConst> LPtr; typedef Loki::LockingPtr<A,LOKI_DEFAULT_MUTEX,DontPropagateConst> UserLockingPtr;
typedef Loki::LockingPtr<A,LOKI_DEFAULT_MUTEX,PropagateConst> CLPtr; typedef Loki::LockingPtr<A,LOKI_DEFAULT_MUTEX,PropagateConst> ConstUserLockingPtr;
void* RunLocked(void *id) void* RunLocked(void *id)
{ {
@ -69,7 +68,7 @@ void* RunLocked(void *id)
static Loki::Mutex m; static Loki::Mutex m;
for(int i=0; i<loop; i++) for(int i=0; i<loop; i++)
{ {
LPtr l(a,m); UserLockingPtr l(a,m);
l->print(id); l->print(id);
} }
return 0; return 0;
@ -81,7 +80,7 @@ void* RunConstLocked(void *id)
static Loki::Mutex m; static Loki::Mutex m;
for(int i=0; i<loop; i++) for(int i=0; i<loop; i++)
{ {
CLPtr l(a,m); ConstUserLockingPtr l(a,m);
l->print(id); l->print(id);
} }
return 0; return 0;
@ -124,6 +123,7 @@ int main ()
Thread::JoinThreads(threads); Thread::JoinThreads(threads);
Thread::DeleteThreads(threads); Thread::DeleteThreads(threads);
} }