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
e7f2954f
Commit
e7f2954f
authored
May 30, 2004
by
Alexander Viro
Committed by
Linus Torvalds
May 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: amd64 - #if abuse fixes
#if where #ifdef should've been. Fixed.
parent
908d6d81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
arch/x86_64/kernel/signal.c
arch/x86_64/kernel/signal.c
+6
-6
include/asm-x86_64/semaphore.h
include/asm-x86_64/semaphore.h
+7
-7
No files found.
arch/x86_64/kernel/signal.c
View file @
e7f2954f
...
...
@@ -57,7 +57,7 @@ sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, struct pt_regs re
current
->
blocked
=
newset
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
#if DEBUG_SIG
#if
def
DEBUG_SIG
printk
(
"rt_sigsuspend savset(%lx) newset(%lx) regs(%p) rip(%lx)
\n
"
,
saveset
,
newset
,
&
regs
,
regs
.
rip
);
#endif
...
...
@@ -158,7 +158,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs regs)
goto
badframe
;
}
#if DEBUG_SIG
#if
def
DEBUG_SIG
printk
(
"%d sigreturn rip:%lx rsp:%lx frame:%p rax:%lx
\n
"
,
current
->
pid
,
regs
.
rip
,
regs
.
rsp
,
frame
,
eax
);
#endif
...
...
@@ -295,7 +295,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
goto
give_sigsegv
;
}
#if DEBUG_SIG
#if
def
DEBUG_SIG
printk
(
"%d old rip %lx old rsp %lx old rax %lx
\n
"
,
current
->
pid
,
regs
->
rip
,
regs
->
rsp
,
regs
->
rax
);
#endif
...
...
@@ -320,7 +320,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
set_fs
(
USER_DS
);
regs
->
eflags
&=
~
TF_MASK
;
#if DEBUG_SIG
#if
def
DEBUG_SIG
printk
(
"SIG deliver (%s:%d): sp=%p pc=%p ra=%p
\n
"
,
current
->
comm
,
current
->
pid
,
frame
,
regs
->
rip
,
frame
->
pretcode
);
#endif
...
...
@@ -343,7 +343,7 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
{
struct
k_sigaction
*
ka
=
&
current
->
sighand
->
action
[
sig
-
1
];
#if DEBUG_SIG
#if
def
DEBUG_SIG
printk
(
"handle_signal pid:%d sig:%lu rip:%lx rsp:%lx regs=%p
\n
"
,
current
->
pid
,
sig
,
regs
->
rip
,
regs
->
rsp
,
regs
);
#endif
...
...
@@ -455,7 +455,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
void
do_notify_resume
(
struct
pt_regs
*
regs
,
sigset_t
*
oldset
,
__u32
thread_info_flags
)
{
#if DEBUG_SIG
#if
def
DEBUG_SIG
printk
(
"do_notify_resume flags:%x rip:%lx rsp:%lx caller:%lx pending:%lx
\n
"
,
thread_info_flags
,
regs
->
rip
,
regs
->
rsp
,
__builtin_return_address
(
0
),
signal_pending
(
current
));
#endif
...
...
include/asm-x86_64/semaphore.h
View file @
e7f2954f
...
...
@@ -47,12 +47,12 @@ struct semaphore {
atomic_t
count
;
int
sleepers
;
wait_queue_head_t
wait
;
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
long
__magic
;
#endif
};
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
# define __SEM_DEBUG_INIT(name) \
, (int)&(name).__magic
#else
...
...
@@ -83,7 +83,7 @@ static inline void sema_init (struct semaphore *sem, int val)
atomic_set
(
&
sem
->
count
,
val
);
sem
->
sleepers
=
0
;
init_waitqueue_head
(
&
sem
->
wait
);
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
sem
->
__magic
=
(
int
)
&
sem
->
__magic
;
#endif
}
...
...
@@ -115,7 +115,7 @@ asmlinkage void __up(struct semaphore * sem);
*/
static
inline
void
down
(
struct
semaphore
*
sem
)
{
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
CHECK_MAGIC
(
sem
->
__magic
);
#endif
might_sleep
();
...
...
@@ -142,7 +142,7 @@ static inline int down_interruptible(struct semaphore * sem)
{
int
result
;
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
CHECK_MAGIC
(
sem
->
__magic
);
#endif
might_sleep
();
...
...
@@ -171,7 +171,7 @@ static inline int down_trylock(struct semaphore * sem)
{
int
result
;
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
CHECK_MAGIC
(
sem
->
__magic
);
#endif
...
...
@@ -199,7 +199,7 @@ static inline int down_trylock(struct semaphore * sem)
*/
static
inline
void
up
(
struct
semaphore
*
sem
)
{
#if WAITQUEUE_DEBUG
#if
def
WAITQUEUE_DEBUG
CHECK_MAGIC
(
sem
->
__magic
);
#endif
__asm__
__volatile__
(
...
...
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