[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
Linus Torvalds <> wrote:

> How about something like this?

At first glance, this looks reasonable.

It also looks like it should be used to replace a lot of the
cancel_delayed_work() calls that attempt to cancel _undelayed_ work items.
That would allow a number of work items to be downgraded from delayed_work to

Also, the name "run_scheduled_work" sort of suggests that the work *will* be
run regardless of whether it was pending or not. Given the confusion over
cancel_delayed_work(), I imagine this will rain confusion too.

+ if (get_wq_data(work) == cwq
+ && test_bit(WORK_STRUCT_PENDING, &work->management)

I wonder if those can be combined, perhaps:

+ if ((work->management & ~WORK_STRUCT_NOAUTOREL) ==
+ ((unsigned long) cwq | (1 << WORK_STRUCT_PENDING))

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


+ if (!test_bit(WORK_STRUCT_PENDING, &work->management))

Should possibly be:

+ if (!work_pending(work))

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: 2006-12-06 18:47    [W:0.121 / U:3.280 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site