[
https://issues.apache.org/jira/browse/GEODE-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15886968#comment-15886968
]
ASF GitHub Bot commented on GEODE-2494:
---------------------------------------
Github user pivotal-jbarrett commented on a diff in the pull request:
https://github.com/apache/geode-native/pull/36#discussion_r103353568
--- Diff: src/cppcache/src/LRUList.hpp ---
@@ -20,32 +20,32 @@
* limitations under the License.
*/
+#include <atomic>
+
#include <geode/geode_globals.hpp>
#include <geode/SharedPtr.hpp>
-#include "SpinLock.hpp"
+
+#include "util/concurrent/spinlock_mutex.hpp"
namespace apache {
namespace geode {
namespace client {
+
// Bit mask for recently used
-#define RECENTLY_USED_BITS 1ul
+#define RECENTLY_USED_BITS 1u
// Bit mask for evicted
-#define EVICTED_BITS 2ul
+#define EVICTED_BITS 2u
--- End diff --
They are macros, but they could be converted to `const` in anonymous
namespace or even in this namespace or `constexpr` on the class itself. I will
look at what that looks like and maybe update it.
> Replace SpinLock class with C++11 style BasicLockable class, spinlock_mutex.
> ----------------------------------------------------------------------------
>
> Key: GEODE-2494
> URL: https://issues.apache.org/jira/browse/GEODE-2494
> Project: Geode
> Issue Type: Sub-task
> Components: native client
> Reporter: Jacob S. Barrett
> Assignee: Jacob S. Barrett
>
> Replace {{SpinLock}} class with C++11 style
> {{[BasicLockable|http://en.cppreference.com/w/cpp/concept/BasicLockable]}}
> class, {{spinlock_mutex}}. You can find several public domain examples of how
> to implement a {{spinlock_mutex}} that can be used with
> {{[std::lock_guard|http://en.cppreference.com/w/cpp/thread/lock_guard]}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)