MCPcopy Create free account
hub / github.com/defold/defold / TEST

Function TEST

engine/dlib/src/test/test_spinlock.cpp:39–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39TEST(dmSpinlock, Test)
40{
41 dmSpinlock::Create(&g_Lock);
42 dmThread::Thread t1 = dmThread::New(Thread, 0xf000, 0, "t1");
43 dmThread::Thread t2 = dmThread::New(Thread, 0xf000, 0, "t2");
44 dmThread::Join(t1);
45 dmThread::Join(t2);
46 ASSERT_EQ(ITER * 2, g_Value);
47 dmSpinlock::Destroy(&g_Lock);
48}
49
50int main(int argc, char **argv)
51{

Callers

nothing calls this directly

Calls 4

CreateFunction · 0.50
NewFunction · 0.50
JoinFunction · 0.50
DestroyFunction · 0.50

Tested by

no test coverage detected