Netdev List
 help / color / mirror / Atom feed
* lock_sock or sock_hold ?
@ 2010-07-26 14:00 Neshama Parhoti
  2010-07-26 14:43 ` Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: Neshama Parhoti @ 2010-07-26 14:00 UTC (permalink / raw)
  To: netdev

hello everyone,

can you please be kind and help me understand the differences between
lock_sock and sock_hold ?

i can see that lock_sock takes a spin lock (bh) to mark owned = 1, and
then takes a mutex, whereas sock_hold only increases the atomic
refcnt.

but how do i know which of them I should use ?

i'm puzzled as to when should those two different APIs be used..

thank you a lot
~pnesh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-26 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26 14:00 lock_sock or sock_hold ? Neshama Parhoti
2010-07-26 14:43 ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox