Query on SPIN Mutex in FreeBSD.

sivakumar.subramani at wipro.com sivakumar.subramani at wipro.com
Fri Oct 6 02:37:36 PDT 2006


Hi,



I have a query regarding the mutex lock in network driver,



When I was browsing all network drivers in FreeBSD, I found none of the
drivers are using MTX_SPIN, instead all of them are using MTX_DEF. When
I read the man page of the mutex, it is mentioned that we need to use
MTX_SPIN in primary interrupt code. Is that mean that I need to hold the
MTX_SPIN lock in ISR routine? I am facing a conflicting issue regarding
the DTR usage (freeing in Stop and Use it ISR) between Stop and ISR
routine. I want to know whether I can use a MTX_SPIN lock between these
functions. I mean I will hold the SPIN_LOCK in ISR and in stop entry
point function such that the freeing and the usage of DTR between STOP
and ISR is synchronized. Is that correct approach?





Any suggestion please?



Thanks,

~Siva




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com


More information about the freebsd-net mailing list