[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090518131054.1ace6885@gondolin>
Date: Mon, 18 May 2009 13:10:54 +0200
From: Cornelia Huck <cornelia.huck@...ibm.com>
To: tom.leiming@...il.com
Cc: arjan@...radead.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, Ming Lei <tom.leiming@...il.com>
Subject: Re: [PATCH 1/2] kernel:async function call:introduce
async_run_inatomic(v3)
On Sat, 16 May 2009 21:54:17 +0800,
tom.leiming@...il.com 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists