Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/common/memory_usage.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions test/conformance/conformance_resumable_tasks.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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"
Expand Down
13 changes: 13 additions & 0 deletions test/tbb/test_eh_thread.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down