1 #define msecsleep(x) (x)
26 #include "atomic_smart_ptr.h"
27 #include "xthread.cpp"
41 virtual int x()
const {
return m_x;}
53 virtual int x()
const {
return -m_x;}
54 virtual int xorg()
const {
return m_x;}
62 for(
int i = 0; i < 1000000; i++) {
83 main(
int argc,
char **argv)
85 std::thread threads[NUM_THREADS];
87 for(
int i = 0; i < NUM_THREADS; i++) {
88 std::thread th( &start_routine);
91 for(
int i = 0; i < NUM_THREADS; i++) {
101 printf(
"succeeded\n");