Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
seL4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Panda
seL4
Commits
3d100f43
Commit
3d100f43
authored
10 years ago
by
Adrian Danis
Browse files
Options
Downloads
Patches
Plain Diff
trivial: style
parent
7d877465
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/arch/ia32/c_traps.c
+17
-15
17 additions, 15 deletions
src/arch/ia32/c_traps.c
with
17 additions
and
15 deletions
src/arch/ia32/c_traps.c
+
17
−
15
View file @
3d100f43
...
...
@@ -17,7 +17,8 @@
#include
<api/syscall.h>
void
__attribute__
((
noreturn
))
__attribute__
((
externally_visible
))
restore_user_context
(
void
);
void
__attribute__
((
noreturn
))
__attribute__
((
externally_visible
))
restore_user_context
(
void
)
{
void
__attribute__
((
noreturn
))
__attribute__
((
externally_visible
))
restore_user_context
(
void
)
{
/* set the tss.esp0 */
tss_ptr_set_esp0
(
&
ia32KStss
,
((
uint32_t
)
ksCurThread
)
+
0x4c
);
if
(
unlikely
(
ksCurThread
==
ia32KSfpuOwner
))
{
...
...
@@ -78,12 +79,12 @@ void __attribute__((noreturn)) __attribute__((externally_visible)) restore_user_
"pop %%ecx
\n
"
"sti
\n
"
"sysexit
\n
"
:
:
"r"
(
&
ksCurThread
->
tcbContext
.
registers
[
EAX
])
// Clobber memory so the compiler is forced to complete all stores
// before running this assembler
:
"memory"
);
:
:
"r"
(
&
ksCurThread
->
tcbContext
.
registers
[
EAX
])
// Clobber memory so the compiler is forced to complete all stores
// before running this assembler
:
"memory"
);
}
else
{
asm
volatile
(
// Set our stack pointer to the top of the tcb so we can efficiently pop
...
...
@@ -102,18 +103,19 @@ void __attribute__((noreturn)) __attribute__((externally_visible)) restore_user_
// skip faulteip, tls_base, error
"addl $12, %%esp
\n
"
"iret
\n
"
:
:
"r"
(
&
ksCurThread
->
tcbContext
.
registers
[
EAX
])
// Clobber memory so the compiler is forced to complete all stores
// before running this assembler
:
"memory"
);
:
:
"r"
(
&
ksCurThread
->
tcbContext
.
registers
[
EAX
])
// Clobber memory so the compiler is forced to complete all stores
// before running this assembler
:
"memory"
);
}
while
(
1
);
while
(
1
);
}
void
__attribute__
((
fastcall
))
__attribute__
((
externally_visible
))
c_handle_interrupt
(
int
irq
,
int
syscall
);
void
__attribute__
((
fastcall
))
__attribute__
((
externally_visible
))
c_handle_interrupt
(
int
irq
,
int
syscall
)
{
void
__attribute__
((
fastcall
))
__attribute__
((
externally_visible
))
c_handle_interrupt
(
int
irq
,
int
syscall
)
{
if
(
irq
==
int_unimpl_dev
)
{
handleUnimplementedDevice
();
}
else
if
(
irq
==
int_page_fault
)
{
...
...
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