acadia/sys/test2.cpp

29 lines
559 B
C++
Raw Normal View History

2023-06-06 17:12:08 -07:00
#include <mammoth/debug.h>
#include <mammoth/thread.h>
2023-06-06 16:24:03 -07:00
#define CHECK(expr) \
{ \
uint64_t code = expr; \
if (code != Z_OK) { \
ZDebug("crash!"); \
return 1; \
} \
}
void thread_entry(void* a) {
dbgln("In thread");
dbgln(static_cast<const char*>(a));
2023-06-06 16:24:03 -07:00
}
int main() {
dbgln("Main thread");
2023-06-06 16:24:03 -07:00
const char* a = "a";
const char* b = "bee";
const char* c = "cee";
const char* d = "dee";
Thread t1(thread_entry, a);
Thread t2(thread_entry, b);
return 0;
}