[lkml]   [2006]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Export current_is_keventd() for libphy

On Wed, 6 Dec 2006, David Howells wrote:
> + if (get_wq_data(work) == cwq
> + && test_bit(WORK_STRUCT_PENDING, &work->management)
> I wonder if those can be combined, perhaps:

Gcc should do it for us, afaik. I didn't check, but gcc is generally
pretty good at combining logical operations like this, because it's very

> Otherwise for i386 the compiler can't combine them because test_bit() is done
> with inline asm.

Nope. Look again.

test_bit() with a constant number is done very much in C, and very much on
purpose. _Exactly_ to allow the compiler to combine these kinds of things.

> And:
> + if (!test_bit(WORK_STRUCT_PENDING, &work->management))
> Should possibly be:
> + if (!work_pending(work))

Yeah, that's a worthy cleanup.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-11-18 23:46    [W:0.144 / U:3.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site