Skip to content

Commit 0616d8b

Browse files
committed
Cleanup - removed artifacts of c++03 atomics implementation
1 parent c03852e commit 0616d8b

File tree

6 files changed

+0
-160
lines changed

6 files changed

+0
-160
lines changed

configure.ac

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -685,11 +685,6 @@ AC_ARG_WITH(system-boost,
685685
[SYSTEM_BOOST=Y])
686686
AC_SUBST(SYSTEM_BOOST)
687687

688-
ATOMICLIB=atomic
689-
AC_ARG_WITH(atomiclib,
690-
[ --with-atomiclib build with explicitly specified atomic support library],
691-
[ATOMICLIB=${withval}])
692-
693688
dnl Avoid dumb '-g -O2' autoconf's default
694689
dnl Debugging information and optimization flags should be set in prefix.$platform file
695690
dnl Should be replaced with AC_PROG_GCC_DEFAULT_FLAGS() when available
@@ -1044,7 +1039,6 @@ dnl Check for libraries
10441039
AC_SEARCH_LIBS(dlopen, dl)
10451040
AC_CHECK_LIB(m, main)
10461041
AC_SEARCH_LIBS(inet_aton, resolv)
1047-
AC_CHECK_LIB($ATOMICLIB, main)
10481042

10491043
dnl Check for libraries for static C++ runtime linking
10501044
AC_CHECK_LIB(supc++, main, XE_APPEND(-lsupc++, STATIC_CXXSUPPORT_LIB))

src/common/classes/SyncObject.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ bool SyncObject::lock(Sync* sync, SyncType type, const char* from, int timeOut)
5757
const AtomicCounter::counter_type newState = oldState + 1;
5858
if (lockState.compareExchange(oldState, newState))
5959
{
60-
WaitForFlushCache();
6160
#ifdef DEV_BUILD
6261
MutexLockGuard g(mutex, FB_FUNCTION);
6362
reason(from);
@@ -113,7 +112,6 @@ bool SyncObject::lock(Sync* sync, SyncType type, const char* from, int timeOut)
113112
if (lockState.compareExchange(oldState, -1))
114113
{
115114
exclusiveThread = thread;
116-
WaitForFlushCache();
117115
#ifdef DEV_BUILD
118116
MutexLockGuard g(mutex, FB_FUNCTION);
119117
#endif
@@ -168,7 +166,6 @@ bool SyncObject::lockConditional(SyncType type, const char* from)
168166
const AtomicCounter::counter_type newState = oldState + 1;
169167
if (lockState.compareExchange(oldState, newState))
170168
{
171-
WaitForFlushCache();
172169
#ifdef DEV_BUILD
173170
MutexLockGuard g(mutex, FB_FUNCTION);
174171
#endif
@@ -197,7 +194,6 @@ bool SyncObject::lockConditional(SyncType type, const char* from)
197194

198195
if (lockState.compareExchange(oldState, -1))
199196
{
200-
WaitForFlushCache();
201197
exclusiveThread = thread;
202198
reason(from);
203199
return true;
@@ -227,8 +223,6 @@ void SyncObject::unlock(Sync* /*sync*/, SyncType type)
227223
const AtomicCounter::counter_type oldState = lockState;
228224
const AtomicCounter::counter_type newState = (type == SYNC_SHARED) ? oldState - 1 : 0;
229225

230-
FlushCache();
231-
232226
if (lockState.compareExchange(oldState, newState))
233227
{
234228
if (newState == 0 && waiters)
@@ -248,7 +242,6 @@ void SyncObject::downgrade(SyncType type)
248242
fb_assert(exclusiveThread == ThreadSync::findThread());
249243

250244
exclusiveThread = NULL;
251-
FlushCache();
252245

253246
while (true)
254247
{

src/common/classes/fb_atomic.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,6 @@ class AtomicCounter
162162
std::atomic<counter_type> counter;
163163
};
164164

165-
166-
167-
// NS 2014-08-01: FIXME. Atomic counters use barriers on all platforms, so
168-
// these operations are no-ops and will always be no-ops. They were used
169-
// to work around (incorrectly) bugs in Sparc and PPC atomics code.
170-
inline void FlushCache() { }
171-
inline void WaitForFlushCache() { }
172-
173165
} // namespace Firebird
174166

175167
#endif // CLASSES_FB_ATOMIC_H

src/common/classes/fb_atomic.il

Lines changed: 0 additions & 58 deletions
This file was deleted.

src/common/classes/fb_cas.il

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/common/classes/fb_cas_sax.il

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)