Hi,

I am trying to setup a workqueue to defer computation intensive work
in a performance critical path.  I read about the workqueue mechanism
in the LDD3 book; however, the API seems to be different now.

Specifically: the LDD3 book says that we can create a work_struct and
initialise it as follows:

  INIT_WORK(struct work_struct *work, void (*fn)(void *), void *data);

However, in 2.6.35, I am unable to see the "data" argument to the
INIT_WORK macro.  Also, the "fn" pointer definition has changed to:
void (*fn)(struct work_struct *).

I could get away with initialising the work_struct myself, by looking
at the fields and setting "data" accordingly (work->data is of type
atomic_long_t), but I think they are supposed to be opaque.  Could
someone clarify how I should go about doing this?

Or, is there a different way of implementing the requirement? (defer
computation intensive work in a performance critical path.)

Thanks,
-- 
Vimal

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to