int ret;
DBG();
ret = model->add_thread(new Thread(t, start_routine, arg));
- DEBUG("create thread %d\n", thrd_to_id(*t));
+ DEBUG("create thread %d\n", id_to_int(thrd_to_id(*t)));
return ret;
}
type_str = "unknown type";
}
- printf("Thread: %d\tAction: %s\tMO: %d\tLoc: %#014zx\tValue: %d\n", tid, type_str, order, (size_t)location, value);
+ printf("Thread: %d\tAction: %s\tMO: %d\tLoc: %#014zx\tValue: %d\n", id_to_int(tid), type_str, order, (size_t)location, value);
}
return t;
}
+static inline thread_id_t int_to_id(int i)
+{
+ return i;
+}
+
+static inline int id_to_int(thread_id_t id)
+{
+ return id;
+}
+
#endif /* __THREADS_H__ */