Re: [PATCH 1/2] kernel:async function call:introduceasync_run_inatomic(v3)
From: Cornelia Huck
Date: Mon May 18 2009 - 07:11:19 EST
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).
--
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/