Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
637
Issues
637
List
Boards
Labels
Service Desk
Milestones
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
b4df5a6e
Commit
b4df5a6e
authored
Nov 06, 2019
by
Ondřej Surý
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid an extra atomic_load() call
parent
33612475
Pipeline
#24978
passed with stages
in 42 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
lib/isc/stats.c
lib/isc/stats.c
+2
-5
No files found.
lib/isc/stats.c
View file @
b4df5a6e
...
...
@@ -157,15 +157,12 @@ void isc_stats_update_if_greater(isc_stats_t *stats,
REQUIRE
(
ISC_STATS_VALID
(
stats
));
REQUIRE
(
counter
<
stats
->
ncounters
);
isc_statscounter_t
curr_value
;
isc_statscounter_t
curr_value
=
atomic_load_relaxed
(
&
stats
->
counters
[
counter
]);
do
{
curr_value
=
atomic_load_explicit
(
&
stats
->
counters
[
counter
],
memory_order_relaxed
);
if
(
curr_value
>=
value
)
{
break
;
}
}
while
(
!
atomic_compare_exchange_strong
(
&
stats
->
counters
[
counter
],
&
curr_value
,
value
));
...
...
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