* @brief Get the string representation of an OS process priority. * * @param priority A `std::optional ` object. * @return A string containing the name of the priority, or "unknown" if the priority is not recognized, or "N/A" if the optional value is not set. */
| 2800 | * @return A string containing the name of the priority, or "unknown" if the priority is not recognized, or "N/A" if the optional value is not set. |
| 2801 | */ |
| 2802 | std::string os_process_priority_name(const std::optional<BS::os_process_priority>& priority) |
| 2803 | { |
| 2804 | if (priority.has_value()) |
| 2805 | { |
| 2806 | const std::map<BS::os_process_priority, std::string>::const_iterator it = os_process_priority_map.find(*priority); |
| 2807 | return (it != os_process_priority_map.end()) ? it->second : "unknown"; |
| 2808 | } |
| 2809 | return "N/A"; |
| 2810 | } |
| 2811 | |
| 2812 | /** |
| 2813 | * @brief A map between pre-defined OS thread priorities and their string representations. |
no test coverage detected