2 * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include "common/mm_resource_manager_utils.h"
23 static const char *mm_resource_manager_res_str[MM_RESOURCE_MANAGER_RES_TYPE_MAX] = {
32 static const char *mm_resource_manager_app_class_str[MM_RESOURCE_MANAGER_APP_CLASS_MAX] = {
37 static const char *mm_resource_manager_condition_str[MM_RESOURCE_MANAGER_RES_TYPE_COND_MAX] = {
44 const char *_mm_resource_manager_get_res_str(mm_resource_manager_res_type_e type)
46 MM_RM_RETVM_IF(type < 0 || type >= MM_RESOURCE_MANAGER_RES_TYPE_MAX, "",
47 "Type is out of range");
48 return mm_resource_manager_res_str[type];
51 const char *_mm_resource_manager_get_app_class_str(mm_resource_manager_app_class_e cls)
53 MM_RM_RETVM_IF(cls < 0 || cls >= MM_RESOURCE_MANAGER_APP_CLASS_MAX, "",
54 "App class is out of range");
55 return mm_resource_manager_app_class_str[cls];
58 const char *_mm_resource_manager_get_condition_str(mm_resource_manager_res_type_cond_e cond)
60 MM_RM_RETVM_IF(cond < 0 || cond >= MM_RESOURCE_MANAGER_RES_TYPE_COND_MAX, "",
61 "Resource type condition is out of range");
62 return mm_resource_manager_condition_str[cond];
65 uint64_t _mm_rm_hash64(uint64_t id)