Fix various issues related to stability when using highly compliant compilers such as Comeau 4.3.0.1, VC7.1 and GCC 3.2
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@108 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
80e63b12a3
commit
b53b3265e4
56 changed files with 441 additions and 203 deletions
|
@ -54,9 +54,6 @@ namespace Loki
|
|||
|
||||
static IntType AtomicDecrement(volatile IntType& lval)
|
||||
{ return --lval; }
|
||||
|
||||
static IntType AtomicDivide(volatile IntType& lval)
|
||||
{ return lval /= val; }
|
||||
|
||||
static void AtomicAssign(volatile IntType & lval, IntType val)
|
||||
{ lval = val; }
|
||||
|
@ -98,13 +95,13 @@ namespace Loki
|
|||
|
||||
Lock(const Lock&);
|
||||
Lock& operator=(const Lock&);
|
||||
Lock(); // buggy design
|
||||
public:
|
||||
|
||||
explicit Lock(ObjectLevelLockable& host) : host_(host)
|
||||
{
|
||||
::EnterCriticalSection(&host_.mtx_);
|
||||
}
|
||||
|
||||
~Lock()
|
||||
{
|
||||
::LeaveCriticalSection(&host_.mtx_);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue