<div dir="ltr"><div><div><div>Hi<br><br></div>In running kernel there are many places you can look to get the usage. But the bottom line is<br><br></div>* You can take a spinlock under a mutex. e.g. mutex_lock---&gt;spinlock-----critical section-----spinunlock---&gt;mutex_unlock.<br><br></div>* You can not take a mutex under a spinlock. e.g. spinlock---&gt;mutex_lock -----critical section ....mutex_unlock----&gt;spinunlock is not allowed.<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 25, 2016 at 11:37 AM, priyaranjan <span dir="ltr">&lt;<a href="mailto:priyaranjan45678@gmail.com" target="_blank">priyaranjan45678@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello All,<div><br></div><div>Do you have any idea of a situation where we would need mutex and spinlock to be locked together? I think there is an example for this in Linux kernel. Can anyone help me?</div><div><br></div><div>Regards,</div><div>Priyaranjan</div></div>
<br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Please don&#39;t print this E- mail unless you really need to - this will preserve trees on planet earth.</div>
</div>