1 // Test program that allows to verify whether Drd works fine for programs that
2 // use the boost::thread, boost::mutex and boost::condition classes.
5 #include <boost/thread/condition.hpp>
6 #include <boost/thread/mutex.hpp>
7 #include <boost/thread/thread.hpp>
11 static boost::condition s_cva
;
12 static boost::mutex s_m
;
15 static void thread_func(void)
17 std::cerr
<< "Thread 2.\n";
18 boost::mutex::scoped_lock
sl(s_m
);
23 int main(int argc
, char** argv
)
25 std::cerr
<< "Thread 1.\n";
26 boost::mutex::scoped_lock
sl(s_m
);
27 boost::thread
t(thread_func
);
32 std::cerr
<< "Finished.\n";