Date: Fri, 6 Oct 2006 15:07:41 +0530 From: <sivakumar.subramani@wipro.com> To: <freebsd-net@freebsd.org> Subject: Query on SPIN Mutex in FreeBSD. Message-ID: <956E7FA2615F3B4595FC5F22870A7221141AF6@blr-m3-msg.wipro.com>
next in thread | raw e-mail | index | archive | help
Hi, =0D I have a query regarding the mutex lock in network driver, =0D 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? =0D =0D Any suggestion please? =0D 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.=0D 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. =0D www.wipro.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?956E7FA2615F3B4595FC5F22870A7221141AF6>