Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
6a45324e
Commit
6a45324e
authored
May 24, 2016
by
Eric Fiselier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments.
parent
b195f825
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
benchmark.cc
src/benchmark.cc
+6
-10
No files found.
src/benchmark.cc
View file @
6a45324e
...
...
@@ -206,11 +206,10 @@ class TimerManager {
void
RemoveErroredThread
()
EXCLUDES
(
lock_
)
{
MutexLock
ml
(
lock_
);
int
last_thread
=
--
running_threads_
==
0
;
if
(
last_thread
&&
running_
)
{
InternalStop
();
}
else
if
(
!
last_thread
){
if
(
last_thread
&&
running_
)
InternalStop
();
else
if
(
!
last_thread
)
phase_condition_
.
notify_all
();
}
}
// REQUIRES: timer is not running
...
...
@@ -279,13 +278,10 @@ class TimerManager {
return
this
->
phase_number_
>
phase_number_cp
||
entered_
==
running_threads_
;
// A thread has aborted in error
};
while
(
true
)
{
phase_condition_
.
wait
(
ml
.
native_handle
(),
cb
);
if
(
phase_number_
>
phase_number_cp
)
phase_condition_
.
wait
(
ml
.
native_handle
(),
cb
);
if
(
phase_number_
>
phase_number_cp
)
return
false
;
else
if
(
running_threads_
==
entered_
)
break
;
}
// else (running_threads_ == entered_) and we are the last thread.
}
// Last thread has reached the barrier
phase_number_
++
;
...
...
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