Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2012 09:43:23 +0800
From:      Yong Fan <yong.fan@exar.com>
To:        John Baldwin <jhb@freebsd.org>, "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org>
Cc:        "drivers@FreeBSD.org" <drivers@freebsd.org>
Subject:   RE: How can I decide whether my code is running in interrupt context or not?
Message-ID:  <88AB8EB2D3F1D249AE07FAFFF17A396F0384C398AC@HZU1EXCH02.hq.exar.com>
In-Reply-To: <201203190924.06912.jhb@freebsd.org>
References:  <88AB8EB2D3F1D249AE07FAFFF17A396F0384C3956A@HZU1EXCH02.hq.exar.com> <201203190924.06912.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks your warm reply.
I see.

Thanks
Yongfan

-----Original Message-----
From: John Baldwin [mailto:jhb@freebsd.org]
Sent: Monday, March 19, 2012 7:24 AM
To: freebsd-drivers@freebsd.org
Cc: Yong Fan; drivers@FreeBSD.org
Subject: Re: How can I decide whether my code is running in interrupt conte=
xt or not?

On Thursday, March 15, 2012 10:06:13 pm Yong Fan wrote:
> Hi all,
>
> In Linux, I can use in_interrupt() function.
> FreeBSD has such a similar kernel function for drivers?

Hmm, we do not, though the only part of your driver that can run in primary
interrupt context is an interrupt filter.  If you mean interrupt-thread
context (i.e. when sleeping is not permitted), then that would apply to you=
r
normal interrupt handler and any callout routines that you have.

--
John Baldwin

The information and any attached documents contained in this message
may be confidential and/or legally privileged.  The message is
intended solely for the addressee(s).  If you are not the intended
recipient, you are hereby notified that any use, dissemination, or
reproduction is strictly prohibited and may be unlawful.  If you are
not the intended recipient, please contact the sender immediately by
return e-mail and destroy all copies of the original message.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?88AB8EB2D3F1D249AE07FAFFF17A396F0384C398AC>