Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
6024955e
Commit
6024955e
authored
Dec 07, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: ADd ERESTART_RESTARTBLOCK signal return handling.
parent
3694fbeb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
36 deletions
+84
-36
arch/sparc/kernel/signal.c
arch/sparc/kernel/signal.c
+28
-12
arch/sparc64/kernel/signal.c
arch/sparc64/kernel/signal.c
+28
-12
arch/sparc64/kernel/signal32.c
arch/sparc64/kernel/signal32.c
+28
-12
No files found.
arch/sparc/kernel/signal.c
View file @
6024955e
...
...
@@ -1019,6 +1019,9 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
struct
sigaction
*
sa
)
{
switch
(
regs
->
u_regs
[
UREG_I0
])
{
case
ERESTART_RESTARTBLOCK
:
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
/* fallthrough */
case
ERESTARTNOHAND
:
no_system_call_restart:
regs
->
u_regs
[
UREG_I0
]
=
EINTR
;
...
...
@@ -1084,6 +1087,13 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs,
regs
->
npc
-=
4
;
restart_syscall
=
0
;
}
if
(
restart_syscall
&&
regs
->
u_regs
[
UREG_I0
]
==
ERESTART_RESTARTBLOCK
)
{
regs
->
u_regs
[
UREG_G1
]
=
__NR_restart_syscall
;
regs
->
pc
-=
4
;
regs
->
npc
-=
4
;
restart_syscall
=
0
;
}
current
->
exit_code
=
signr
;
set_current_state
(
TASK_STOPPED
);
...
...
@@ -1184,6 +1194,12 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs,
regs
->
pc
-=
4
;
regs
->
npc
-=
4
;
}
if
(
restart_syscall
&&
regs
->
u_regs
[
UREG_I0
]
==
ERESTART_RESTARTBLOCK
)
{
regs
->
u_regs
[
UREG_G1
]
=
__NR_restart_syscall
;
regs
->
pc
-=
4
;
regs
->
npc
-=
4
;
}
return
0
;
}
...
...
arch/sparc64/kernel/signal.c
View file @
6024955e
...
...
@@ -573,6 +573,9 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
struct
sigaction
*
sa
)
{
switch
(
regs
->
u_regs
[
UREG_I0
])
{
case
ERESTART_RESTARTBLOCK
:
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
/* fallthrough */
case
ERESTARTNOHAND
:
no_system_call_restart:
regs
->
u_regs
[
UREG_I0
]
=
EINTR
;
...
...
@@ -634,6 +637,13 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs,
regs
->
tnpc
-=
4
;
restart_syscall
=
0
;
}
if
(
restart_syscall
&&
regs
->
u_regs
[
UREG_I0
]
==
ERESTART_RESTARTBLOCK
)
{
regs
->
u_regs
[
UREG_G1
]
=
__NR_restart_syscall
;
regs
->
tpc
-=
4
;
regs
->
tnpc
-=
4
;
restart_syscall
=
0
;
}
current
->
exit_code
=
signr
;
set_current_state
(
TASK_STOPPED
);
...
...
@@ -727,6 +737,12 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs,
regs
->
tpc
-=
4
;
regs
->
tnpc
-=
4
;
}
if
(
restart_syscall
&&
regs
->
u_regs
[
UREG_I0
]
==
ERESTART_RESTARTBLOCK
)
{
regs
->
u_regs
[
UREG_G1
]
=
__NR_restart_syscall
;
regs
->
tpc
-=
4
;
regs
->
tnpc
-=
4
;
}
return
0
;
}
...
...
arch/sparc64/kernel/signal32.c
View file @
6024955e
...
...
@@ -1253,6 +1253,9 @@ static inline void syscall_restart32(unsigned long orig_i0, struct pt_regs *regs
struct
sigaction
*
sa
)
{
switch
(
regs
->
u_regs
[
UREG_I0
])
{
case
ERESTART_RESTARTBLOCK
:
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
/* fallthrough */
case
ERESTARTNOHAND
:
no_system_call_restart:
regs
->
u_regs
[
UREG_I0
]
=
EINTR
;
...
...
@@ -1306,6 +1309,13 @@ int do_signal32(sigset_t *oldset, struct pt_regs * regs,
regs
->
tnpc
-=
4
;
restart_syscall
=
0
;
}
if
(
restart_syscall
&&
regs
->
u_regs
[
UREG_I0
]
==
ERESTART_RESTARTBLOCK
)
{
regs
->
u_regs
[
UREG_G1
]
=
__NR_restart_syscall
;
regs
->
tpc
-=
4
;
regs
->
tnpc
-=
4
;
restart_syscall
=
0
;
}
current
->
exit_code
=
signr
;
set_current_state
(
TASK_STOPPED
);
...
...
@@ -1398,6 +1408,12 @@ int do_signal32(sigset_t *oldset, struct pt_regs * regs,
regs
->
tpc
-=
4
;
regs
->
tnpc
-=
4
;
}
if
(
restart_syscall
&&
regs
->
u_regs
[
UREG_I0
]
==
ERESTART_RESTARTBLOCK
)
{
regs
->
u_regs
[
UREG_G1
]
=
__NR_restart_syscall
;
regs
->
tpc
-=
4
;
regs
->
tnpc
-=
4
;
}
return
0
;
}
...
...
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