Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
predictable_parallel_patterns
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5044f0a1
authored
Jun 06, 2019
by
FritzFlorian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: test that invalidly referenced stack memory.
parent
be2cdbfe
Pipeline
#1250
failed with stages
in 3 minutes 38 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
lib/pls/src/internal/scheduling/task.cpp
+2
-4
test/scheduling_tests.cpp
+3
-0
No files found.
lib/pls/src/internal/scheduling/task.cpp
View file @
5044f0a1
...
@@ -19,17 +19,15 @@ task::task(const task &other) :
...
@@ -19,17 +19,15 @@ task::task(const task &other) :
deque_state_
{
other
.
deque_state_
}
{}
deque_state_
{
other
.
deque_state_
}
{}
void
task
::
execute
()
{
void
task
::
execute
()
{
{
PROFILE_WORK_BLOCK
(
"execute task"
)
PROFILE_WORK_BLOCK
(
"execute task"
)
auto
last_executing
=
thread_state
::
get
()
->
current_task_
;
auto
last_executing
=
thread_state
::
get
()
->
current_task_
;
thread_state
::
get
()
->
current_task_
=
this
;
thread_state
::
get
()
->
current_task_
=
this
;
execute_internal
();
execute_internal
();
PROFILE_END_BLOCK
thread_state
::
get
()
->
current_task_
=
last_executing
;
}
wait_for_all
();
wait_for_all
();
thread_state
::
get
()
->
current_task_
=
last_executing
;
if
(
parent_
!=
nullptr
)
{
if
(
parent_
!=
nullptr
)
{
parent_
->
ref_count_
--
;
parent_
->
ref_count_
--
;
...
...
test/scheduling_tests.cpp
View file @
5044f0a1
...
@@ -70,6 +70,9 @@ TEST_CASE("tbb task are scheduled correctly", "[internal/scheduling/fork_join_ta
...
@@ -70,6 +70,9 @@ TEST_CASE("tbb task are scheduled correctly", "[internal/scheduling/fork_join_ta
std
::
atomic
<
int
>
dummy_parent
{
1
},
overall_counter
{
8
};
std
::
atomic
<
int
>
dummy_parent
{
1
},
overall_counter
{
8
};
force_steal_sub_task
sub_task
{
&
dummy_parent
,
&
overall_counter
};
force_steal_sub_task
sub_task
{
&
dummy_parent
,
&
overall_counter
};
scheduler
::
spawn_child
(
sub_task
);
scheduler
::
spawn_child
(
sub_task
);
// Required, as child operates on our stack's memory!!!
scheduler
::
wait_for_all
();
});
});
my_scheduler
.
terminate
(
true
);
my_scheduler
.
terminate
(
true
);
}
}
...
...
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