Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6222a7a0
Commit
6222a7a0
authored
Sep 13, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vcomp/tests: Limit the number of nested threads.
Without a limit we'd create nb_cpus ^ 2 threads.
parent
3e3caf1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
vcomp.c
dlls/vcomp/tests/vcomp.c
+4
-11
No files found.
dlls/vcomp/tests/vcomp.c
View file @
6222a7a0
...
...
@@ -406,6 +406,10 @@ static void CDECL num_threads_cb(BOOL nested, int parallel, int nested_threads,
is_parallel
=
pomp_in_parallel
();
ok
(
is_parallel
==
parallel
,
"expected %d, got %d
\n
"
,
parallel
,
is_parallel
);
/* limit number of nested threads */
nested_threads
=
min
(
nested_threads
,
256
/
pomp_get_max_threads
()
);
p_vcomp_set_num_threads
(
nested_threads
);
thread_count
=
0
;
p_vcomp_fork
(
TRUE
,
2
,
num_threads_cb2
,
TRUE
,
&
thread_count
);
if
(
nested
)
...
...
@@ -422,17 +426,6 @@ static void CDECL num_threads_cb(BOOL nested, int parallel, int nested_threads,
is_parallel
=
pomp_in_parallel
();
ok
(
is_parallel
==
parallel
,
"expected %d, got %d
\n
"
,
parallel
,
is_parallel
);
p_vcomp_set_num_threads
(
4
);
thread_count
=
0
;
p_vcomp_fork
(
TRUE
,
2
,
num_threads_cb2
,
TRUE
,
&
thread_count
);
if
(
nested
)
ok
(
thread_count
==
4
,
"expected 4 threads, got %ld
\n
"
,
thread_count
);
else
ok
(
thread_count
==
1
,
"expected 1 thread, got %ld
\n
"
,
thread_count
);
is_parallel
=
pomp_in_parallel
();
ok
(
is_parallel
==
parallel
,
"expected %d, got %d
\n
"
,
parallel
,
is_parallel
);
}
static
void
test_omp_get_num_threads
(
BOOL
nested
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment