Commit 63da4fe7 by Christian Kern

Fix cpplint warnings

parent 03e4f890
......@@ -151,7 +151,7 @@ HazardPointerThreadEntry(GuardType undefined_guard, int guards_per_thread,
guards_per_thread(guards_per_thread),
max_size_retired_list(max_size_retired_list),
// initially, each potential thread is active... if that is not the case
// another thread could call "HelpScan", and block this thread in making
// another thread could call "HelpScan", and block this thread in making
// progress.
// Still, threads can be leave the hazard pointer processing (deactivation),
// but this can only be done once, i.e., this is not revertable...
......@@ -271,8 +271,7 @@ Scan(HazardPointerThreadEntry_t* currentHazardPointerEntry) {
// a bug... this assertions checks that
int expected = -1;
if (!currentHazardPointerEntry->GetScanningThread().CompareAndSwap(
expected, static_cast<int>(GetCurrentThreadIndex())))
{
expected, static_cast<int>(GetCurrentThreadIndex()))) {
assert(false);
}
#endif
......
......@@ -169,17 +169,18 @@ class FixedSizeList {
*/
template< typename GuardType >
class HazardPointerThreadEntry {
#ifdef EMBB_DEBUG
public:
embb::base::Atomic<int>& GetScanningThread()
{
public:
embb::base::Atomic<int>& GetScanningThread() {
return who_is_scanning;
}
private:
private:
embb::base::Atomic<int> who_is_scanning;
#endif
private:
private:
/**
* Value of the undefined guard (means that no guard is set).
*/
......
......@@ -110,6 +110,9 @@ do
if [[ $file == *atomic_arithmetic.h ]]; then
current_rules+=",-readability/function" # All parameters should be named in a function
fi
if [[ $file == *object_pool-inl.h ]]; then
current_rules+=",-readability/function" # All parameters should be named in a function (triggers error with clang if named...)
fi
for filename in "${RAND_FILES[@]}"; do
if [[ $file =~ $filename ]]; then
current_rules+=",-runtime/threadsafe_fn" # These tests are allowed to use the thread unsafe rand()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment