take a look  at might_sleep

On Wed, Oct 14, 2009 at 10:09 AM, Leonidas . <[email protected]> wrote:

> Hi List,
>
> I am aware of in_interrupt() call which can be used to check current
> context and take action accordingly.
>
> Is there any api which can help figure out whether we are executing
> while hold a spinlock? I.e an api which can help figure out
> sleepable/nonsleepable context? If it is not there, what can
> be done for writing the same? Any pointers will be helpful.
>
> -Leo.
>
> --
> 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