Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
triazo
/
kernel
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
3
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9a970ebd
authored
Nov 29, 2015
by
malcolm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
nested cli and sti fix
parent
a9a9bf75
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
src/asm.h
src/asm.h
View file @
9a970ebd
...
...
@@ -35,14 +35,23 @@ inline uint32_t inl(uint16_t port)
return
ret
;
}
uint32_t
__int_depth
;
inline
void
disable_int
()
{
asm
volatile
(
"cli"
);
__int_depth
++
;
}
inline
void
enable_int
()
{
if
(
__int_depth
>
0
)
{
if
(
--
__int_depth
==
0
)
{
asm
volatile
(
"sti"
);
}
}
}
#endif
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