1. http://kukuruku.co/hub/cpp/lock-free-data-structures-yet-another-treatise download

2.  ./build.sh -b 64 --with-boost  /home/informix/tools/boost_1_59_0

 #include <cds/init.h>       // for cds::Initialize and cds::Terminate
#include <cds/gc/hp.h>      // for cds::HP (Hazard Pointer) SMR
int main(int argc, char** argv)
{
    // Initialize libcds
    cds::Initialize();
    {
        // Initialize Hazard Pointer singleton
        cds::gc::HP hpGC;
        // If main thread uses lock-free containers
        // the main thread should be attached to libcds infrastructure
        cds::threading::Manager::attachThread();
        // Now you can use HP-based containers in the main thread
        //...
    }
    // Terminate libcds
    cds::Terminate();
}

export LD_LIBRARY_PATH=/home/informix/tools/cds-2.0.0/bin/gcc-amd64-linux-64:$LD_LIBRARY_PATH

g++ --std=c++11  -L /home/informix/tools/cds-2.0.0/bin/gcc-amd64-linux-64  -I /home/informix/tools/cds-2.0.0 -l cds   test1.cpp -o test1.exe

 

arrow
arrow
    全站熱搜

    hedgezzz 發表在 痞客邦 留言(0) 人氣()