Mercurial > minori
comparison dep/animia/src/bsd.cpp @ 84:eab9e623eb84
dep/animia: update from upstream
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Wed, 25 Oct 2023 14:53:05 -0400 |
| parents | 1ce00c1c8ddc |
| children | c912128af0eb |
comparison
equal
deleted
inserted
replaced
| 83:d02fdf1d6708 | 84:eab9e623eb84 |
|---|---|
| 18 # include <libutil.h> | 18 # include <libutil.h> |
| 19 #elif defined(__APPLE__) | 19 #elif defined(__APPLE__) |
| 20 # include <libproc.h> | 20 # include <libproc.h> |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 namespace Animia::Unix { | 23 namespace Animia { namespace Unix { |
| 24 | 24 |
| 25 /* this is a cleaned up version of a function from... Apple? | 25 /* this is a cleaned up version of a function from... Apple? |
| 26 ...anyway, what it essentially does is gets the size and stuff from | 26 ...anyway, what it essentially does is gets the size and stuff from |
| 27 sysctl() and reserves the space in a vector to store the PIDs */ | 27 sysctl() and reserves the space in a vector to store the PIDs */ |
| 28 std::vector<int> get_all_pids() { | 28 std::vector<int> get_all_pids() { |
| 118 map[i] = get_open_files(i); | 118 map[i] = get_open_files(i); |
| 119 } | 119 } |
| 120 return map; | 120 return map; |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace Animia::Unix | 123 } // namespace Unix |
| 124 } // namespace Animia |
