Re: [patch 2.6.13-rc3] i386: clean up user_mode macros

2005-07-26 Thread Chuck Ebbert
On Mon, 25 Jul 2005 at 16:13:13 -0700 (PDT), Linus Torvalds wrote: > On Mon, 25 Jul 2005, Chuck Ebbert wrote: > > > > Recent patches from the Xen group changed the X86 user_mode macros. > > > > This patch does the following: > > > > 1. Makes the new user_mode() return 0 or 1 (same as x8

Re: [patch 2.6.13-rc3] i386: clean up user_mode macros

2005-07-25 Thread Lee Revell
On Mon, 2005-07-25 at 20:20 -0400, Steven Rostedt wrote: > And I > would also assume that you prefer x *= 2 over x <<= 1 (also since the > first person to show this example used x <<= 2. Right Lee? :-) Let us never speak of that again. These aren't the droids you're looking for. Lee - To unsubs

Re: [patch 2.6.13-rc3] i386: clean up user_mode macros

2005-07-25 Thread randy_dunlap
On Mon, 25 Jul 2005 18:34:13 -0700 Andrew Morton wrote: > Miles Bader <[EMAIL PROTECTED]> wrote: > > > > Linus Torvalds <[EMAIL PROTECTED]> writes: > > > Ask a hundred random C programmers what "!!x" means, versus what "x != 0" > > > means, and time their replies. > > > > I've always thought o

Re: [patch 2.6.13-rc3] i386: clean up user_mode macros

2005-07-25 Thread Andrew Morton
Miles Bader <[EMAIL PROTECTED]> wrote: > > Linus Torvalds <[EMAIL PROTECTED]> writes: > > Ask a hundred random C programmers what "!!x" means, versus what "x != 0" > > means, and time their replies. > > I've always thought of "!!" as the "canonicalize boolean" operator... Me too. Once you get

Re: [patch 2.6.13-rc3] i386: clean up user_mode macros

2005-07-25 Thread Miles Bader
Linus Torvalds <[EMAIL PROTECTED]> writes: > Ask a hundred random C programmers what "!!x" means, versus what "x != 0" > means, and time their replies. I've always thought of "!!" as the "canonicalize boolean" operator... Vaguely ugly, but I think it's actually _more clear_ than != 0 in contexts

Re: [patch 2.6.13-rc3] i386: clean up user_mode macros

2005-07-25 Thread Steven Rostedt
On Mon, 2005-07-25 at 16:13 -0700, Linus Torvalds wrote: > I _really_ prefer > > x != 0 > > over > > !!x Good to hear. This means that you should have no problem accepting my previous patch for signal.c that changed the x ^ y to x != y. And I would also assume that you prefer x

Re: [patch 2.6.13-rc3] i386: clean up user_mode macros

2005-07-25 Thread Linus Torvalds
On Mon, 25 Jul 2005, Chuck Ebbert wrote: > > Recent patches from the Xen group changed the X86 user_mode macros. > > This patch does the following: > > 1. Makes the new user_mode() return 0 or 1 (same as x86_64) I _really_ prefer x != 0 over !!x since double negat

[patch 2.6.13-rc3] i386: clean up user_mode macros

2005-07-25 Thread Chuck Ebbert
Recent patches from the Xen group changed the X86 user_mode macros. This patch does the following: 1. Makes the new user_mode() return 0 or 1 (same as x86_64) 2. Removes conditional jump from user_mode_vm() (it's called every timer tick on each CPU on SMP) I've been