Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
25bff148
Commit
25bff148
authored
7 years ago
by
Kaspar Schleiser
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #7169 from gebart/pr/xtimer-while
xtimer: Use {} for empty while loops
parents
72c3c9cf
8e10e6e3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sys/xtimer/xtimer_core.c
+3
-3
3 additions, 3 deletions
sys/xtimer/xtimer_core.c
with
3 additions
and
3 deletions
sys/xtimer/xtimer_core.c
+
3
−
3
View file @
25bff148
...
@@ -452,7 +452,7 @@ static void _timer_callback(void)
...
@@ -452,7 +452,7 @@ static void _timer_callback(void)
/* make sure the timer counter also arrived
/* make sure the timer counter also arrived
* in the next timer period */
* in the next timer period */
while
(
_xtimer_lltimer_now
()
==
_xtimer_lltimer_mask
(
0xFFFFFFFF
))
;
while
(
_xtimer_lltimer_now
()
==
_xtimer_lltimer_mask
(
0xFFFFFFFF
))
{}
}
}
else
{
else
{
/* we ended up in _timer_callback and there is
/* we ended up in _timer_callback and there is
...
@@ -466,7 +466,7 @@ overflow:
...
@@ -466,7 +466,7 @@ overflow:
/* check if next timers are close to expiring */
/* check if next timers are close to expiring */
while
(
timer_list_head
&&
(
_time_left
(
_xtimer_lltimer_mask
(
timer_list_head
->
target
),
reference
)
<
XTIMER_ISR_BACKOFF
))
{
while
(
timer_list_head
&&
(
_time_left
(
_xtimer_lltimer_mask
(
timer_list_head
->
target
),
reference
)
<
XTIMER_ISR_BACKOFF
))
{
/* make sure we don't fire too early */
/* make sure we don't fire too early */
while
(
_time_left
(
_xtimer_lltimer_mask
(
timer_list_head
->
target
),
reference
))
;
while
(
_time_left
(
_xtimer_lltimer_mask
(
timer_list_head
->
target
),
reference
))
{}
/* pick first timer in list */
/* pick first timer in list */
xtimer_t
*
timer
=
timer_list_head
;
xtimer_t
*
timer
=
timer_list_head
;
...
@@ -519,7 +519,7 @@ overflow:
...
@@ -519,7 +519,7 @@ overflow:
/* check if the end of this period is very soon */
/* check if the end of this period is very soon */
if
(
_xtimer_lltimer_mask
(
now
+
XTIMER_ISR_BACKOFF
)
<
now
)
{
if
(
_xtimer_lltimer_mask
(
now
+
XTIMER_ISR_BACKOFF
)
<
now
)
{
/* spin until next period, then advance */
/* spin until next period, then advance */
while
(
_xtimer_lltimer_now
()
>=
now
)
;
while
(
_xtimer_lltimer_now
()
>=
now
)
{}
_next_period
();
_next_period
();
reference
=
0
;
reference
=
0
;
goto
overflow
;
goto
overflow
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment