login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
January
»
27
Re: [PATCH 2/3] x86: Macrofy resuable code
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Sam Ravnborg <sam@...>
To: Abhishek Sagar <sagar.abhishek@...>
Cc: LKML <linux-kernel@...>, <jkenisto@...>, <ananth@...>, Masami Hiramatsu <mhiramat@...>, Ingo Molnar <mingo@...>
Subject:
Re: [PATCH 2/3] x86: Macrofy resuable code
Date: Sunday, January 27, 2008 - 5:23 am
On Sun, Jan 27, 2008 at 02:39:22PM +0530, Abhishek Sagar wrote:
quoted text
> Encapsulate reusable code . > > Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com> > --- > > diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c > index a99e764..45f2949 100644 > --- a/arch/x86/kernel/kprobes.c > +++ b/arch/x86/kernel/kprobes.c > @@ -74,6 +74,13 @@ DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); > #define stack_addr(regs) ((unsigned long *)®s->sp) > #endif > > +#define kprobe_bkpt_addr(regs) \ > + ((unsigned long)(regs->ip - sizeof(kprobe_opcode_t))) > + > +#define is_jprobe_bkpt(ptr) \ > + ((ptr > (u8 *)jprobe_return) && (ptr < (u8 *)jprobe_return_end)) > + > +
Small static functions are preferred over macros. Any particular reason to use a macro here? Sam --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 2/3] x86: Macrofy resuable code
, Abhishek Sagar
, (Sun Jan 27, 5:09 am)
Re: [PATCH 2/3] x86: Macrofy resuable code
, Sam Ravnborg
, (Sun Jan 27, 5:23 am)
Re: [PATCH 2/3] x86: Macrofy resuable code
, Abhishek Sagar
, (Sun Jan 27, 9:31 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Andrew Morton
2.6.23-rc3-mm1
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Yinghai Lu
Re: [PATCH RFC] x86: check for and defend against BIOS memory corruption
Frederik Deweerdt
[-mm patch] remove tcp header from tcp_v4_check (take #2)
openbsd-misc
:
linux-netdev
:
David Miller
[GIT]: Networking
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Herbert Xu
Re: [PATCH 2/3][NET_BATCH] net core use batching
git
:
Colocation donated by:
Who's online
There are currently
1 user
and
496 guests
online.
Online users
savemarriage
Syndicate