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
b8f8251c
Commit
b8f8251c
authored
Oct 13, 2002
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Update for signal handling changes.
parent
d301001e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
23 deletions
+13
-23
arch/arm/kernel/signal.c
arch/arm/kernel/signal.c
+13
-23
No files found.
arch/arm/kernel/signal.c
View file @
b8f8251c
...
@@ -59,11 +59,11 @@ asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, old_sigset_t m
...
@@ -59,11 +59,11 @@ asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, old_sigset_t m
sigset_t
saveset
;
sigset_t
saveset
;
mask
&=
_BLOCKABLE
;
mask
&=
_BLOCKABLE
;
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
saveset
=
current
->
blocked
;
saveset
=
current
->
blocked
;
siginitset
(
&
current
->
blocked
,
mask
);
siginitset
(
&
current
->
blocked
,
mask
);
recalc_sigpending
();
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
regs
->
ARM_r0
=
-
EINTR
;
regs
->
ARM_r0
=
-
EINTR
;
while
(
1
)
{
while
(
1
)
{
...
@@ -87,11 +87,11 @@ sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, struct pt_regs *regs)
...
@@ -87,11 +87,11 @@ sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, struct pt_regs *regs)
return
-
EFAULT
;
return
-
EFAULT
;
sigdelsetmask
(
&
newset
,
~
_BLOCKABLE
);
sigdelsetmask
(
&
newset
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
saveset
=
current
->
blocked
;
saveset
=
current
->
blocked
;
current
->
blocked
=
newset
;
current
->
blocked
=
newset
;
recalc_sigpending
();
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
regs
->
ARM_r0
=
-
EINTR
;
regs
->
ARM_r0
=
-
EINTR
;
while
(
1
)
{
while
(
1
)
{
...
@@ -207,10 +207,10 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
...
@@ -207,10 +207,10 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
goto
badframe
;
goto
badframe
;
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
current
->
blocked
=
set
;
current
->
blocked
=
set
;
recalc_sigpending
();
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
if
(
restore_sigcontext
(
regs
,
&
frame
->
sc
))
if
(
restore_sigcontext
(
regs
,
&
frame
->
sc
))
goto
badframe
;
goto
badframe
;
...
@@ -247,10 +247,10 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
...
@@ -247,10 +247,10 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
goto
badframe
;
goto
badframe
;
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sig
mask_
lock
);
spin_lock_irq
(
&
current
->
sig
->
sig
lock
);
current
->
blocked
=
set
;
current
->
blocked
=
set
;
recalc_sigpending
();
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sig
mask_
lock
);
spin_unlock_irq
(
&
current
->
sig
->
sig
lock
);
if
(
restore_sigcontext
(
regs
,
&
frame
->
uc
.
uc_mcontext
))
if
(
restore_sigcontext
(
regs
,
&
frame
->
uc
.
uc_mcontext
))
goto
badframe
;
goto
badframe
;
...
@@ -477,12 +477,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
...
@@ -477,12 +477,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
ka
->
sa
.
sa_handler
=
SIG_DFL
;
ka
->
sa
.
sa_handler
=
SIG_DFL
;
if
(
!
(
ka
->
sa
.
sa_flags
&
SA_NODEFER
))
{
if
(
!
(
ka
->
sa
.
sa_flags
&
SA_NODEFER
))
{
spin_lock_irq
(
&
tsk
->
sig
mask_
lock
);
spin_lock_irq
(
&
tsk
->
sig
->
sig
lock
);
sigorsets
(
&
tsk
->
blocked
,
&
tsk
->
blocked
,
sigorsets
(
&
tsk
->
blocked
,
&
tsk
->
blocked
,
&
ka
->
sa
.
sa_mask
);
&
ka
->
sa
.
sa_mask
);
sigaddset
(
&
tsk
->
blocked
,
sig
);
sigaddset
(
&
tsk
->
blocked
,
sig
);
recalc_sigpending
();
recalc_sigpending
();
spin_unlock_irq
(
&
tsk
->
sig
mask_
lock
);
spin_unlock_irq
(
&
tsk
->
sig
->
sig
lock
);
}
}
return
;
return
;
}
}
...
@@ -520,20 +520,10 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
...
@@ -520,20 +520,10 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
for
(;;)
{
for
(;;)
{
unsigned
long
signr
=
0
;
unsigned
long
signr
=
0
;
struct
k_sigaction
*
ka
;
struct
k_sigaction
*
ka
;
sigset_t
*
mask
=
&
current
->
blocked
;
local_irq_disable
();
spin_lock_irq
(
&
current
->
sig
->
siglock
);
if
(
current
->
sig
->
shared_pending
.
head
)
{
signr
=
dequeue_signal
(
&
current
->
blocked
,
&
info
);
spin_lock
(
&
current
->
sig
->
siglock
);
spin_unlock_irq
(
&
current
->
sig
->
siglock
);
signr
=
dequeue_signal
(
&
current
->
sig
->
shared_pending
,
mask
,
&
info
);
spin_unlock
(
&
current
->
sig
->
siglock
);
}
if
(
!
signr
)
{
spin_lock
(
&
current
->
sigmask_lock
);
signr
=
dequeue_signal
(
&
current
->
pending
,
mask
,
&
info
);
spin_unlock
(
&
current
->
sigmask_lock
);
}
local_irq_enable
();
if
(
!
signr
)
if
(
!
signr
)
break
;
break
;
...
...
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