Date: Sun, 2 Dec 2012 11:48:16 -0800 (PST) From: Choupani <Choupani@gmail.com> To: freebsd-net@freebsd.org Subject: protect common resources in kernel Message-ID: <1354477696312-5766007.post@n5.nabble.com>
next in thread | raw e-mail | index | archive | help
Dears, I'm working on kernel in FreeBSD-9. I need to protect a=20 common resource (for example a queue).=20 There are 4 points for access (read/write) this common resource as bellows: 1. ether_input() =E2=80=93 hardware interrupt 2. ip_input() & ip_output() =E2=80=93 software interrupt 3. dev_ioctl() =E2=80=93 local io control in our own kernel module 4. another kernel thread Which scenario is proper to use for this purpose: 1. kernel mutex (MTX_DEF) 2. kernel mutex (MTX_SPIN) 3. kernel share/exclusive lock 4. kernel reader/writer lock -- View this message in context: http://freebsd.1045724.n5.nabble.com/protect-= common-resources-in-kernel-tp5766007.html Sent from the freebsd-net mailing list archive at Nabble.com.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1354477696312-5766007.post>