Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kernel
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
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
redox-os
kernel
Commits
52ad689d
Verified
Commit
52ad689d
authored
3 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Notify debug: readers of new input after all input is processed
parent
1aae949f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/arch/aarch64/device/uart_pl011.rs
+2
-1
2 additions, 1 deletion
src/arch/aarch64/device/uart_pl011.rs
src/arch/x86_64/interrupt/irq.rs
+3
-1
3 additions, 1 deletion
src/arch/x86_64/interrupt/irq.rs
src/scheme/debug.rs
+4
-0
4 additions, 0 deletions
src/scheme/debug.rs
with
9 additions
and
2 deletions
src/arch/aarch64/device/uart_pl011.rs
+
2
−
1
View file @
52ad689d
...
...
@@ -2,7 +2,7 @@ use core::fmt::{self, Write};
use
core
::
ptr
;
use
crate
::
device
::
gic
;
use
crate
::
scheme
::
debug
::
debug_input
;
use
crate
::
scheme
::
debug
::
{
debug_input
,
debug_notify
}
;
bitflags!
{
/// UARTFR
...
...
@@ -138,6 +138,7 @@ impl SerialPort {
while
self
.line_sts
()
.contains
(
UartFrFlags
::
RXFF
)
{
debug_input
(
self
.read_reg
(
self
.data_reg
)
as
u8
);
}
debug_notify
();
}
pub
fn
send
(
&
mut
self
,
data
:
u8
)
{
...
...
This diff is collapsed.
Click to expand it.
src/arch/x86_64/interrupt/irq.rs
+
3
−
1
View file @
52ad689d
...
...
@@ -7,7 +7,7 @@ use crate::context::timeout;
use
crate
::
device
::{
local_apic
,
ioapic
,
pic
};
use
crate
::
device
::
serial
::{
COM1
,
COM2
};
use
crate
::
ipi
::{
ipi
,
IpiKind
,
IpiTarget
};
use
crate
::
scheme
::
debug
::
debug_input
;
use
crate
::
scheme
::
debug
::
{
debug_input
,
debug_notify
}
;
use
crate
::{
context
,
time
};
//resets to 0 in context::switch()
...
...
@@ -208,6 +208,7 @@ interrupt!(com2, || {
while
let
Some
(
c
)
=
COM2
.lock
()
.receive
()
{
debug_input
(
c
);
}
debug_notify
();
eoi
(
3
);
});
...
...
@@ -215,6 +216,7 @@ interrupt!(com1, || {
while
let
Some
(
c
)
=
COM1
.lock
()
.receive
()
{
debug_input
(
c
);
}
debug_notify
();
eoi
(
4
);
});
...
...
This diff is collapsed.
Click to expand it.
src/scheme/debug.rs
+
4
−
0
View file @
52ad689d
...
...
@@ -42,6 +42,10 @@ fn handles_mut() -> RwLockWriteGuard<'static, BTreeMap<usize, Handle>> {
/// Add to the input queue
pub
fn
debug_input
(
data
:
u8
)
{
INPUT
.call_once
(
init_input
)
.send
(
data
);
}
// Notify readers of input updates
pub
fn
debug_notify
()
{
for
(
id
,
_handle
)
in
handles
()
.iter
()
{
event
::
trigger
(
SCHEME_ID
.load
(
Ordering
::
SeqCst
),
*
id
,
EVENT_READ
);
}
...
...
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