Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FlightOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Armin Luntzer
FlightOS
Commits
aa219008
Commit
aa219008
authored
5 years ago
by
Armin Luntzer
Browse files
Options
Downloads
Patches
Plain Diff
CLOCKEVENT: disable scheduling when checking clock device and keep
interrupts enabled
parent
05674a72
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/clockevent.c
+19
-4
19 additions, 4 deletions
kernel/clockevent.c
with
19 additions
and
4 deletions
kernel/clockevent.c
+
19
−
4
View file @
aa219008
...
...
@@ -15,6 +15,7 @@
#include
<kernel/clockevent.h>
#include
<kernel/export.h>
#include
<kernel/tick.h>
#include
<kernel/sched.h>
#include
<errno.h>
...
...
@@ -242,9 +243,16 @@ void clockevents_register_device(struct clock_event_device *dev)
spin_lock
(
&
clockevents_spinlock
);
list_add_tail
(
&
dev
->
node
,
&
clockevent_devices
);
arch_local_irq_disable
();
/* this should be safe without disabling interrupts, if not,
* we need a different strategy to calibrate the tick period of the
* device...
*
* XXX need long-time run-time testing for verifcation
*/
sched_disable
();
tick_check_device
(
dev
);
arch_local_irq
_enable
();
sched
_enable
();
spin_unlock
(
&
clockevents_spinlock
);
}
...
...
@@ -266,9 +274,16 @@ int clockevents_offer_device(void)
if
(
dev
->
state
!=
CLOCK_EVT_STATE_UNUSED
)
continue
;
arch_local_irq_disable
();
/* this should be save without disabling interrupts, if not,
* we need a different strategy to calibrate the tick period of
* the device...
*
* XXX need long-time run-time testing for verifcation
*/
sched_disable
();
tick_check_device
(
dev
);
arch_local_irq
_enable
();
sched
_enable
();
return
0
;
}
...
...
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