diff --git a/init.sh b/init.sh index a93b7bc3f..8a3ac285f 100755 --- a/init.sh +++ b/init.sh @@ -1,21 +1,11 @@ #!/bin/bash -if ! type "wget" > /dev/null; then - echo >&2 "Please install wget or set it in your path. Aborting."; exit 1; -fi - -if ! type "git" > /dev/null; then - echo >&2 "Please install git or set it in your path. Aborting."; exit 1; -fi - -if ! type "cmake" > /dev/null; then - echo >&2 "Please install cmake or set it in your path. Aborting."; exit 1; -fi - -cd cmake -./setup.sh -cd .. +# install all dependencies on debian based operating systems +for pkg in wget git cmake uuid-dev clang-3.8; do + dpkg -s $pkg 2>/dev/null >/dev/null || sudo apt-get -y install $pkg +done +# setup libs (download) cd libs ./setup.sh cd .. diff --git a/tests/concurrent/futex.cpp b/tests/concurrent/futex.cpp index bc26fc7c6..7a7070de1 100644 --- a/tests/concurrent/futex.cpp +++ b/tests/concurrent/futex.cpp @@ -9,12 +9,16 @@ Futex futex; int x = 0; -void test_lock(int id) { +/** + * @param thread id + */ +void test_lock(int) { std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<> dis(0, 1000); - for (int i = 0; i < 5000000; ++i) { + // TODO: create long running test + for (int i = 0; i < 5; ++i) { { std::unique_lock guard(futex); x++;