Re: [PATCH 1/2] kernel:async function call:introduceasync_run_inatomic(v3)

From: Arjan van de Ven
Date: Mon May 18 2009 - 09:59:29 EST


On Mon, 18 May 2009 13:10:54 +0200
Cornelia Huck <cornelia.huck@xxxxxxxxxx> wrote:

> On Sat, 16 May 2009 21:54:17 +0800,
> tom.leiming@xxxxxxxxx wrote:
>
> > + /**
> > + * async_run_inatomic - in atomic contexts schedule a function for
> > + * asynchronous execution
> > + *
> > + * @ptr: function to execute asynchronously
> > + * @data: data pointer to pass to the function
> > + *
> > + * The purpose of this function is to offer a simple way to
> > schedule an
> > + * asynchronous thread from an atomic context.
> > + *
> > + * Return zero one success, !zero on failured
> > + * Note: async_run_inatomic() uses a distinct running list in order
> > + * to avoid slowing down synchronization within the general domain.
> > + * Since it does not return a cookie for checkpointing, it is for
> > callers
> > + * that don't need later synchronization.
> > + */
> > +int async_run_inatomic(async_func_ptr *ptr, void *data)
> > +{
> > + return !__async_schedule(ptr, data,
> > &async_running_no_sync, 1); +}
> > +EXPORT_SYMBOL_GPL(async_run_inatomic);
> > +
>
> While we can skip synchronization on cookies, we still need something
> like async_run_synchronize() for module unloading (and possibly
> others).

We don't have this problem if we use the existing naming and existing
standard domain...
(I don't like the "run" part of the name, rather than schedule.. lets
keep the apis consistent please)


--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/