Mercurial > minori
comparison dep/animia/src/fd.cc @ 212:6b08fbd7f206
chore: merge branches
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 07 Jan 2024 09:54:50 -0500 |
parents | 71832ffe425a |
children |
comparison
equal
deleted
inserted
replaced
211:7cf53145de11 | 212:6b08fbd7f206 |
---|---|
12 # include "animia/fd/xnu.h" | 12 # include "animia/fd/xnu.h" |
13 #endif | 13 #endif |
14 | 14 |
15 #ifdef LIBUTIL | 15 #ifdef LIBUTIL |
16 # include "animia/fd/libutil.h" | 16 # include "animia/fd/libutil.h" |
17 #endif | |
18 | |
19 #ifdef LIBKVM | |
20 # include "animia/fd/kvm.h" | |
17 #endif | 21 #endif |
18 | 22 |
19 namespace animia::internal { | 23 namespace animia::internal { |
20 | 24 |
21 bool EnumerateOpenFiles(const std::set<pid_t>& pids, open_file_proc_t open_file_proc) { | 25 bool EnumerateOpenFiles(const std::set<pid_t>& pids, open_file_proc_t open_file_proc) { |
33 success ^= xnu::EnumerateOpenFiles(pids, open_file_proc); | 37 success ^= xnu::EnumerateOpenFiles(pids, open_file_proc); |
34 #endif | 38 #endif |
35 | 39 |
36 #ifdef LIBUTIL | 40 #ifdef LIBUTIL |
37 success ^= libutil::EnumerateOpenFiles(pids, open_file_proc); | 41 success ^= libutil::EnumerateOpenFiles(pids, open_file_proc); |
42 #endif | |
43 | |
44 #ifdef LIBKVM | |
45 success ^= kvm::EnumerateOpenFiles(pids, open_file_proc); | |
38 #endif | 46 #endif |
39 | 47 |
40 return success; | 48 return success; |
41 } | 49 } |
42 | 50 |
57 | 65 |
58 #ifdef LIBUTIL | 66 #ifdef LIBUTIL |
59 success ^= libutil::EnumerateOpenProcesses(process_proc); | 67 success ^= libutil::EnumerateOpenProcesses(process_proc); |
60 #endif | 68 #endif |
61 | 69 |
70 #ifdef LIBKVM | |
71 success ^= kvm::EnumerateOpenProcesses(process_proc); | |
72 #endif | |
73 | |
62 return success; | 74 return success; |
63 } | 75 } |
64 | 76 |
65 } // namespace animia::internal | 77 } // namespace animia::internal |