MCPcopy Create free account
hub / github.com/axboe/liburing / close_files

Function close_files

test/file-register.c:20–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18static int no_update = 0;
19
20static void close_files(int *files, int nr_files, int add)
21{
22 char fname[32];
23 int i;
24
25 for (i = 0; i < nr_files; i++) {
26 if (files)
27 close(files[i]);
28 if (!add)
29 sprintf(fname, ".reg.%d", i);
30 else
31 sprintf(fname, ".add.%d", i + add);
32 unlink(fname);
33 }
34 if (files)
35 free(files);
36}
37
38static int *open_files(int nr_files, int extra, int add)
39{

Callers 11

test_shrinkFunction · 0.70
test_growFunction · 0.70
test_replace_allFunction · 0.70
test_replaceFunction · 0.70
test_removalsFunction · 0.70
test_additionsFunction · 0.70
test_sparseFunction · 0.70
test_basic_manyFunction · 0.70
test_basicFunction · 0.70
test_zeroFunction · 0.70
test_skipFunction · 0.70

Calls

no outgoing calls

Tested by 11

test_shrinkFunction · 0.56
test_growFunction · 0.56
test_replace_allFunction · 0.56
test_replaceFunction · 0.56
test_removalsFunction · 0.56
test_additionsFunction · 0.56
test_sparseFunction · 0.56
test_basic_manyFunction · 0.56
test_basicFunction · 0.56
test_zeroFunction · 0.56
test_skipFunction · 0.56