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
Kirill Smelkov
linux
Commits
e52038cb
Commit
e52038cb
authored
Dec 06, 2002
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ALPHA] Add restart_syscall support.
parent
942abc30
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
9 deletions
+29
-9
arch/alpha/kernel/signal.c
arch/alpha/kernel/signal.c
+20
-7
arch/alpha/kernel/systbls.S
arch/alpha/kernel/systbls.S
+1
-0
include/asm-alpha/current.h
include/asm-alpha/current.h
+1
-1
include/asm-alpha/thread_info.h
include/asm-alpha/thread_info.h
+5
-0
include/asm-alpha/unistd.h
include/asm-alpha/unistd.h
+2
-1
No files found.
arch/alpha/kernel/signal.c
View file @
e52038cb
...
@@ -587,6 +587,10 @@ syscall_restart(unsigned long r0, unsigned long r19,
...
@@ -587,6 +587,10 @@ syscall_restart(unsigned long r0, unsigned long r19,
regs
->
r19
=
r19
;
regs
->
r19
=
r19
;
regs
->
pc
-=
4
;
regs
->
pc
-=
4
;
break
;
break
;
case
ERESTART_RESTARTBLOCK
:
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
regs
->
r0
=
EINTR
;
break
;
}
}
}
}
...
@@ -628,13 +632,22 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
...
@@ -628,13 +632,22 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
return
1
;
return
1
;
}
}
if
(
r0
&&
if
(
r0
)
{
(
regs
->
r0
==
ERESTARTNOHAND
||
switch
(
regs
->
r0
)
{
regs
->
r0
==
ERESTARTSYS
||
case
ERESTARTNOHAND
:
regs
->
r0
==
ERESTARTNOINTR
))
{
case
ERESTARTSYS
:
regs
->
r0
=
r0
;
/* reset v0 and a3 and replay syscall */
case
ERESTARTNOINTR
:
regs
->
r19
=
r19
;
/* Reset v0 and a3 and replay syscall. */
regs
->
pc
-=
4
;
regs
->
r0
=
r0
;
regs
->
r19
=
r19
;
regs
->
pc
-=
4
;
break
;
case
ERESTART_RESTARTBLOCK
:
/* Force v0 to the restart syscall and reply. */
regs
->
r0
=
__NR_restart_syscall
;
regs
->
pc
-=
4
;
break
;
}
}
}
if
(
single_stepping
)
if
(
single_stepping
)
ptrace_set_bpt
(
current
);
/* re-set breakpoint */
ptrace_set_bpt
(
current
);
/* re-set breakpoint */
...
...
arch/alpha/kernel/systbls.S
View file @
e52038cb
...
@@ -431,6 +431,7 @@ sys_call_table:
...
@@ -431,6 +431,7 @@ sys_call_table:
.
quad
sys_epoll_wait
.
quad
sys_epoll_wait
.
quad
sys_remap_file_pages
/*
410
*/
.
quad
sys_remap_file_pages
/*
410
*/
.
quad
sys_set_tid_address
.
quad
sys_set_tid_address
.
quad
sys_restart_syscall
.
size
sys_call_table
,
.
-
sys_call_table
.
size
sys_call_table
,
.
-
sys_call_table
.
type
sys_call_table
,
@
object
.
type
sys_call_table
,
@
object
...
...
include/asm-alpha/current.h
View file @
e52038cb
#ifndef _ALPHA_CURRENT_H
#ifndef _ALPHA_CURRENT_H
#define _ALPHA_CURRENT_H
#define _ALPHA_CURRENT_H
#include <
asm
/thread_info.h>
#include <
linux
/thread_info.h>
#define get_current() (current_thread_info()->task + 0)
#define get_current() (current_thread_info()->task + 0)
#define current get_current()
#define current get_current()
...
...
include/asm-alpha/thread_info.h
View file @
e52038cb
...
@@ -25,6 +25,8 @@ struct thread_info {
...
@@ -25,6 +25,8 @@ struct thread_info {
int
bpt_nsaved
;
int
bpt_nsaved
;
unsigned
long
bpt_addr
[
2
];
/* breakpoint handling */
unsigned
long
bpt_addr
[
2
];
/* breakpoint handling */
unsigned
int
bpt_insn
[
2
];
unsigned
int
bpt_insn
[
2
];
struct
restart_block
restart_block
;
};
};
/*
/*
...
@@ -35,6 +37,9 @@ struct thread_info {
...
@@ -35,6 +37,9 @@ struct thread_info {
task: &tsk, \
task: &tsk, \
exec_domain: &default_exec_domain, \
exec_domain: &default_exec_domain, \
addr_limit: KERNEL_DS, \
addr_limit: KERNEL_DS, \
.restart_block = { \
.fn = do_no_restart_syscall, \
}, \
}
}
#define init_thread_info (init_thread_union.thread_info)
#define init_thread_info (init_thread_union.thread_info)
...
...
include/asm-alpha/unistd.h
View file @
e52038cb
...
@@ -349,7 +349,8 @@
...
@@ -349,7 +349,8 @@
#define __NR_sys_epoll_wait 409
#define __NR_sys_epoll_wait 409
#define __NR_remap_file_pages 410
#define __NR_remap_file_pages 410
#define __NR_set_tid_address 411
#define __NR_set_tid_address 411
#define NR_SYSCALLS 412
#define __NR_restart_syscall 412
#define NR_SYSCALLS 413
#if defined(__GNUC__)
#if defined(__GNUC__)
...
...
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