mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 23:23:02 +01:00
Make VC 2013 x64 generate the same code as VC 2010 x64 : "lock xadd" instead of "lock add".
There was hagnups in SS x64 during new nbackup locking testing without this patch. Note, both 32-bit compilers generate "lock xadd" instructions.
This commit is contained in:
parent
61a7560fe6
commit
9b0a730c78
@ -112,13 +112,13 @@ public:
|
||||
{
|
||||
if (lock.value() < 0)
|
||||
return false;
|
||||
if (++lock > 0)
|
||||
if (lock.exchangeAdd(1) >= 0)
|
||||
{
|
||||
reason(aReason);
|
||||
return true;
|
||||
}
|
||||
// We stepped on writer's toes. Fix our mistake
|
||||
if (--lock == 0)
|
||||
if (lock.exchangeAdd(-1) == 1)
|
||||
unblockWaiting();
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user