MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / reader

Function reader

test/shared-memory3.c:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void
41reader()
42{
43 ATOMIC_SHARED int val;
44 int i = 0;
45
46 while (1) {
47 val = *sharedMemory;
48 if (val != i) {
49 i = *sharedMemory;
50 printf("reader %d \n", i);
51 fflush(stdout);
52 }
53 sleep(1);
54 }
55}
56
57void
58writer()

Callers 1

mainFunction · 0.70

Calls 1

sleepFunction · 0.50

Tested by

no test coverage detected