summaryrefslogtreecommitdiff
path: root/runtime/src/thirdparty
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/thirdparty')
-rw-r--r--runtime/src/thirdparty/ittnotify/ittnotify_config.h10
-rw-r--r--runtime/src/thirdparty/ittnotify/ittnotify_static.cpp (renamed from runtime/src/thirdparty/ittnotify/ittnotify_static.c)6
2 files changed, 12 insertions, 4 deletions
diff --git a/runtime/src/thirdparty/ittnotify/ittnotify_config.h b/runtime/src/thirdparty/ittnotify/ittnotify_config.h
index cc494cb4db432..f231e70d181f3 100644
--- a/runtime/src/thirdparty/ittnotify/ittnotify_config.h
+++ b/runtime/src/thirdparty/ittnotify/ittnotify_config.h
@@ -161,6 +161,10 @@
# define ITT_ARCH_MIPS64 6
#endif /* ITT_ARCH_MIPS64 */
+#ifndef ITT_ARCH_RISCV64
+# define ITT_ARCH_RISCV64 7
+#endif /* ITT_ARCH_RISCV64 */
+
#ifndef ITT_ARCH
# if defined _M_IX86 || defined __i386__
# define ITT_ARCH ITT_ARCH_IA32
@@ -178,6 +182,8 @@
# define ITT_ARCH ITT_ARCH_MIPS
# elif defined __mips__ && defined __mips64
# define ITT_ARCH ITT_ARCH_MIPS64
+# elif defined __riscv && __riscv_xlen == 64
+# define ITT_ARCH ITT_ARCH_RISCV64
# endif
#endif
@@ -330,7 +336,9 @@ ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend)
: "memory");
return result;
}
-#elif ITT_ARCH==ITT_ARCH_ARM || ITT_ARCH==ITT_ARCH_PPC64 || ITT_ARCH==ITT_ARCH_AARCH64 || ITT_ARCH==ITT_ARCH_MIPS || ITT_ARCH==ITT_ARCH_MIPS64
+#elif ITT_ARCH == ITT_ARCH_ARM || ITT_ARCH == ITT_ARCH_PPC64 || \
+ ITT_ARCH == ITT_ARCH_AARCH64 || ITT_ARCH == ITT_ARCH_MIPS || \
+ ITT_ARCH == ITT_ARCH_MIPS64 || ITT_ARCH == ITT_ARCH_RISCV64
#define __TBB_machine_fetchadd4(addr, val) __sync_fetch_and_add(addr, val)
#endif /* ITT_ARCH==ITT_ARCH_IA64 */
#ifndef ITT_SIMPLE_INIT
diff --git a/runtime/src/thirdparty/ittnotify/ittnotify_static.c b/runtime/src/thirdparty/ittnotify/ittnotify_static.cpp
index a2a73ada2e0c1..c48b3f420bb78 100644
--- a/runtime/src/thirdparty/ittnotify/ittnotify_static.c
+++ b/runtime/src/thirdparty/ittnotify/ittnotify_static.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "kmp_config.h"
+#include "kmp_os.h"
#include "ittnotify_config.h"
#if ITT_PLATFORM==ITT_PLATFORM_WIN
@@ -226,8 +227,6 @@ static __itt_api_info api_list[] = {
#pragma warning(pop)
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
-static const char dll_path[PATH_MAX] = { 0 };
-
/* static part descriptor which handles. all notification api attributes. */
__itt_global _N_(_ittapi_global) = {
ITT_MAGIC, /* identification info */
@@ -238,7 +237,7 @@ __itt_global _N_(_ittapi_global) = {
MUTEX_INITIALIZER, /* mutex */
NULL, /* dynamic library handle */
NULL, /* error_handler */
- (const char**)&dll_path, /* dll_path_ptr */
+ NULL, /* dll_path_ptr */
(__itt_api_info*)&api_list, /* api_list_ptr */
NULL, /* next __itt_global */
NULL, /* thread_list */
@@ -1098,6 +1097,7 @@ ITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id init_grou
switch (lib_version) {
case 0:
groups = __itt_group_legacy;
+ KMP_FALLTHROUGH();
case 1:
/* Fill all pointers from dynamic library */
for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++)