123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef BASE_LINUX_UTIL_H_
- #define BASE_LINUX_UTIL_H_
- #include <stdint.h>
- #include <sys/types.h>
- #include <string>
- #include <vector>
- #include "base/base_export.h"
- namespace base {
- BASE_EXPORT extern char g_linux_distro[];
- BASE_EXPORT std::string GetLinuxDistro();
- #if defined(UNIT_TEST)
- BASE_EXPORT std::string GetKeyValueFromOSReleaseFileForTesting(
- const std::string& input,
- const char* key);
- #endif
- BASE_EXPORT void SetLinuxDistro(const std::string& distro);
- BASE_EXPORT bool GetThreadsForProcess(pid_t pid, std::vector<pid_t>* tids);
- BASE_EXPORT pid_t FindThreadIDWithSyscall(pid_t pid,
- const std::string& expected_data,
- bool* syscall_supported);
- BASE_EXPORT pid_t FindThreadID(pid_t pid, pid_t ns_tid, bool* ns_pid_supported);
- }
- #endif
|