Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
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
relibc
Commits
b48da562
Verified
Commit
b48da562
authored
8 months ago
by
Jacob Lorentzon
Browse files
Options
Downloads
Patches
Plain Diff
Add rtsig to i686 trampoline too.
parent
13e7b776
No related branches found
No related tags found
1 merge request
!493
Implement realtime signals and remaining signal.h APIs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
redox-rt/src/arch/i686.rs
+18
-5
18 additions, 5 deletions
redox-rt/src/arch/i686.rs
with
18 additions
and
5 deletions
redox-rt/src/arch/i686.rs
+
18
−
5
View file @
b48da562
...
...
@@ -22,6 +22,7 @@ pub struct SigArea {
pub
tmp_eax
:
usize
,
pub
tmp_ecx
:
usize
,
pub
tmp_edx
:
usize
,
pub
tmp_ptr
:
usize
,
pub
pctl
:
usize
,
// TODO: reference pctl directly
pub
disable_signals_depth
:
u64
,
pub
last_sig_was_restart
:
bool
,
...
...
@@ -166,12 +167,21 @@ asmfunction!(__relibc_internal_sigentry: ["
jz 7f // spurious signal
bsf eax, eax
// If thread was specifically targeted, send the signal to it first.
bt edx, eax
jc 8f
lock btr [ecx + {pctl_word} + 4], eax
jnc 1b
add eax, 32
mov edx, ebx
lea ecx, [eax+32]
mov eax, {SYS_SIGDEQUEUE}
mov edx, gs:[0]
add edx, {tcb_sa_off} + {sa_tmp_ptr}
int 0x80
mov ebx, edx
test eax, eax
jnz 1b
mov eax, ecx
jmp 2f
8:
add eax, 32
...
...
@@ -200,7 +210,7 @@ asmfunction!(__relibc_internal_sigentry: ["
push dword ptr gs:[{tcb_sc_off} + {sc_saved_eflags}]
push dword ptr gs:[{tcb_sa_off} + {sa_tmp_edx}]
push ecx
push
dword ptr gs:[{tcb_sa_off} + {sa_tmp_
ecx
}]
push dword ptr gs:[{tcb_sa_off} + {sa_tmp_eax}]
push ebx
push edi
...
...
@@ -211,7 +221,8 @@ asmfunction!(__relibc_internal_sigentry: ["
fxsave [esp]
push eax
sub esp, 3 * 4
push dword ptr gs:[{tcb_sa_off} + {sa_tmp_ptr}]
sub esp, 2 * 4
mov ecx, esp
call {inner}
...
...
@@ -262,6 +273,7 @@ __relibc_internal_sigentry_crit_third:
sa_tmp_eax
=
const
offset_of!
(
SigArea
,
tmp_eax
),
sa_tmp_ecx
=
const
offset_of!
(
SigArea
,
tmp_ecx
),
sa_tmp_edx
=
const
offset_of!
(
SigArea
,
tmp_edx
),
sa_tmp_ptr
=
const
offset_of!
(
SigArea
,
tmp_ptr
),
sa_altstack_top
=
const
offset_of!
(
SigArea
,
altstack_top
),
sa_altstack_bottom
=
const
offset_of!
(
SigArea
,
altstack_bottom
),
sa_pctl
=
const
offset_of!
(
SigArea
,
pctl
),
...
...
@@ -275,6 +287,7 @@ __relibc_internal_sigentry_crit_third:
pctl_word
=
const
offset_of!
(
SigProcControl
,
pending
),
pctl
=
sym
PROC_CONTROL_STRUCT
,
STACK_ALIGN
=
const
16
,
SYS_SIGDEQUEUE
=
const
syscall
::
SYS_SIGDEQUEUE
,
]);
asmfunction!
(
__relibc_internal_rlct_clone_ret
->
usize
:
[
"
...
...
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