diff --git a/test/common/memory_usage.h b/test/common/memory_usage.h index cf8b4180d4..2bd45f8c15 100644 --- a/test/common/memory_usage.h +++ b/test/common/memory_usage.h @@ -1,5 +1,6 @@ /* - Copyright (c) 2005-2022 Intel Corporation + Copyright (c) 2005-2025 Intel Corporation + Copyright (c) 2025 UXL Foundation Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -93,7 +94,7 @@ namespace utils { bool status = GetProcessMemoryInfo(GetCurrentProcess(), &mem, sizeof(mem)) != 0; ASSERT(status, nullptr); return stat == currentUsage ? mem.PagefileUsage : mem.PeakPagefileUsage; -#elif __unix__ +#elif __unix__ && !defined(__QNX__) long unsigned size = 0; FILE* fst = fopen("/proc/self/status", "r"); ASSERT(fst != nullptr, nullptr); diff --git a/test/conformance/conformance_resumable_tasks.cpp b/test/conformance/conformance_resumable_tasks.cpp index 70fd878da4..f1413e67b1 100644 --- a/test/conformance/conformance_resumable_tasks.cpp +++ b/test/conformance/conformance_resumable_tasks.cpp @@ -1,5 +1,6 @@ /* - Copyright (c) 2020-2021 Intel Corporation + Copyright (c) 2020-2025 Intel Corporation + Copyright (c) 2025 UXL Foundation Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +17,8 @@ #include "common/test.h" -#if (!__TBB_WIN8UI_SUPPORT && !defined(WINAPI_FAMILY) && !__ANDROID__) +#if (!__TBB_WIN8UI_SUPPORT && !defined(WINAPI_FAMILY) && !__ANDROID__ \ + && !__QNX__) #include "oneapi/tbb/task.h" #include "oneapi/tbb/task_group.h" diff --git a/test/tbb/test_eh_thread.cpp b/test/tbb/test_eh_thread.cpp index a8885e66f8..1726f8b9ab 100644 --- a/test/tbb/test_eh_thread.cpp +++ b/test/tbb/test_eh_thread.cpp @@ -1,5 +1,6 @@ /* Copyright (c) 2020-2025 Intel Corporation + Copyright (c) 2025 UXL Foundation Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -45,19 +46,31 @@ void limitThreads(size_t limit) { rlimit rlim; +# ifdef __QNX__ + int ret = getrlimit(RLIMIT_NTHR, &rlim); +# else int ret = getrlimit(RLIMIT_NPROC, &rlim); +# endif CHECK_MESSAGE(0 == ret, "getrlimit has returned an error"); rlim.rlim_cur = (rlim.rlim_max == (rlim_t)RLIM_INFINITY) ? limit : utils::min((rlim_t)limit, rlim.rlim_max); +# ifdef __QNX__ + ret = setrlimit(RLIMIT_NTHR, &rlim); +# else ret = setrlimit(RLIMIT_NPROC, &rlim); +# endif CHECK_MESSAGE(0 == ret, "setrlimit has returned an error"); } size_t getThreadLimit() { rlimit rlim; +# ifdef __QNX__ + int ret = getrlimit(RLIMIT_NTHR, &rlim); +# else int ret = getrlimit(RLIMIT_NPROC, &rlim); +# endif CHECK_MESSAGE(0 == ret, "getrlimit has returned an error"); return rlim.rlim_cur; }