MCPcopy Create free account
hub / github.com/LouisBrunner/valgrind-macos / thread

Function thread

drd/tests/concurrent_close.cpp:16–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14#define THREAD_COUNT 256
15
16void* thread(void*)
17{
18 int fd;
19
20 /* Happens with any file, not just /dev/null */
21 fd = open("/dev/null", O_RDONLY);
22 if (fd >= 0)
23 close(fd);
24 else
25 fprintf(stderr, "Failed to open /dev/null\n");
26 return 0;
27}
28
29int main()
30{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected