MCPcopy Create free account
hub / github.com/diasurgical/devilution / dthread_start

Function dthread_start

Source/dthread.cpp:53–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void dthread_start()
54{
55 const char *error_buf;
56
57 if (gbMaxPlayers == 1) {
58 return;
59 }
60
61 sghWorkToDoEvent = StartEvent();
62 if (!sghWorkToDoEvent) {
63 error_buf = TraceLastError();
64 app_fatal("dthread:1\n%s", error_buf);
65 }
66
67 dthread_running = TRUE;
68
69 sghThread = CreateThread(dthread_handler, &glpDThreadId);
70 if (sghThread == NULL) {
71 error_buf = TraceLastError();
72 app_fatal("dthread2:\n%s", error_buf);
73 }
74}
75
76unsigned int dthread_handler(void *)
77{

Callers 1

NetInitFunction · 0.85

Calls 3

StartEventFunction · 0.85
app_fatalFunction · 0.85
CreateThreadFunction · 0.85

Tested by

no test coverage detected