MCPcopy Create free account
hub / github.com/acl-dev/acl / run

Method run

lib_acl_cpp/samples/event_mutex/main.cpp:22–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 acl::event_mutex& mutex_;
21
22 void* run(void)
23 {
24 acl_doze(500);
25
26 for (int i = 0; i < __nloop; i++)
27 {
28 if (mutex_.lock() == false)
29 {
30 printf("lock error\r\n");
31 break;
32 }
33
34 __count++;
35// acl_doze(100);
36 if (__show)
37 printf("thread-%lu locked ok\r\n",
38 acl::thread::self());
39 assert(mutex_.unlock());
40// acl_doze(10);
41 }
42
43 return NULL;
44 }
45};
46
47static void usage(const char* procname)

Callers

nothing calls this directly

Calls 4

acl_dozeFunction · 0.85
selfFunction · 0.50
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected