1. Jan 21, 2020
  2. Jan 20, 2020
    • Igor Chorazewicz's avatar
      70edea73
    • Igor Chorazewicz's avatar
      concurrent_hash_map: fix possible deadlock in erase · d26fffaa
      Igor Chorazewicz authored
      Consider the following scenario (where A and B are in the same bucket):
      thread 1:		thread 2:
      find(acc1, A)
      			erase(A)
      find(acc2, B)
      
      First, thread 1 takes lock on the bucket and then on element A.
      Then, thread 2 takes a lock on the bucket and tries to lock element A
      but it can't because thread 1 already locked it - this way thread 2 is blocked.
      Next, thread 1 tries to lock the bucket but it can't because thread 2 holds it.
      Neither thread can progress.
      
      This patch fixes that by introducing the same algorithm as in lookup/insert.
      When trying to lock element in erase we now spin in a loop doing try_acquire and
      if we do not succeed after specified amount of time we drop bucket lock and try
      whole operation again.
      d26fffaa
    • Szymon Romik's avatar
      move all comipler check to another cmake file · d7dbeb74
      Szymon Romik authored
      move checking compiling issues from CMakeLists.txt to
      check_compiling_issues.cmake (previous name check_compiler_issues.cmake)
      d7dbeb74
    • Szymon Romik's avatar
      detect if volatile_state is supported · 2ec48d0e
      Szymon Romik authored
      Even if we are ensuring that we use CMAKE_CXX_STANDARD >= 14,
      check if shared_mutex header file is available for the current
      compiler version because CXX_STANDARD is being set to 14 for
      --c++1y parameter. Introduce flag to check if volatile_state is
      supported.
      2ec48d0e
  3. Jan 17, 2020
  4. Jan 16, 2020
  5. Jan 15, 2020
  6. Jan 14, 2020
  7. Jan 13, 2020
  8. Jan 11, 2020
  9. Jan 10, 2020
  10. Jan 09, 2020
    • Lukasz Dorau's avatar
      test: fix one type in volatile_state test · d912f771
      Lukasz Dorau authored
      It fixes the following compilation error:
      
      In file included from /libpmemobj-cpp/tests/volatile_state/\
      volatile_state.cpp:33:0:
      /libpmemobj-cpp/tests/volatile_state/volatile_state.cpp:\
      In function 'void test_vector_of_elements(pmem::obj::pool<root>&)':
      /libpmemobj-cpp/tests/volatile_state/volatile_state.cpp:348:30:\
      error: conversion to 'size_t {aka long unsigned int}' \
      from 'std::__atomic_base<int>::__int_type {aka int}' \
      may change the sign of the result [-Werror=sign-conversion]
        UT_ASSERT(v2_initialized == NUM_ELEMENTS);
                                    ^
      d912f771
    • Szymon Romik's avatar
      Merge pull request #559 from lukaszstolarczuk/change-persistent_ptr_base-class · 56767209
      Szymon Romik authored
      Make persistent_ptr_base non-template and move to main namespace
      56767209
  11. Jan 08, 2020