From 15cc61baf493af01659ee030b418ce33ae556d56 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 27 Oct 2024 09:04:24 -0700 Subject: [PATCH] rocr: Fixing non-portable inline attribute on hsa_flag_* utilities. Change-Id: Ie1c53fef407a71b5ec4c6eaf3a3ed00871184408 [ROCm/ROCR-Runtime commit: 9971e7b004359a1e781db81ab047502a7bd12d76] --- .../runtime/hsa-runtime/inc/hsa_ext_amd.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ext_amd.h b/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ext_amd.h index 2f3b48c1d8..564b0e836d 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ext_amd.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ext_amd.h @@ -70,22 +70,18 @@ extern "C" { */ /** - * @brief Macro to set a flag within uint8_t[8] types - * types + * @brief Macro to set a flag within uint8_t[8] types. */ -static __inline__ __attribute__((always_inline)) void hsa_flag_set64(uint8_t* value, - uint32_t bit) { +static inline void hsa_flag_set64(uint8_t* value, uint32_t bit) { unsigned int index = bit / 8; unsigned int subBit = bit % 8; (((uint8_t*)value)[index]) |= (1 << subBit); } /** - * @brief Macro to use to determine that a flag is set when querying flags within uint8_t[8] - * types + * @brief Macro to determine whether a flag is set within uint8_t[8] types. */ -static __inline__ __attribute__((always_inline)) bool hsa_flag_isset64(uint8_t* value, - uint32_t bit) { +static inline bool hsa_flag_isset64(uint8_t* value, uint32_t bit) { unsigned int index = bit / 8; unsigned int subBit = bit % 8; return ((uint8_t*)value)[index] & (1 << subBit); @@ -130,7 +126,7 @@ typedef struct hsa_amd_packet_header_s { uint16_t header; /** - *Format of the vendor specific packet. + * Format of the vendor specific packet. */ hsa_amd_packet_type8_t AmdFormat;