Date: Fri, 01 Jun 2007 13:19:07 +0300 From: Artis Caune <Artis.Caune@latnet.lv> To: hackers@FreeBSD.org Subject: stopping callouts Message-ID: <465FF29B.3010307@latnet.lv>
next in thread | raw e-mail | index | archive | help
Hello FreeBSD-hackers! what is the right way to stop callout which is initialized with mutex: callout_init_mtx(&callout_function, &my_mtx, 0); should I lock mutex before calling callout_drain() or not? man page says: callout_drain() is identical to callout_stop() and if the callout has an associated mutex, then that mutex must be held when callout_stop() is called. /* MOD_UNLOAD */ MTX_LOCK; callout_drain() MTX_UNLOCK;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?465FF29B.3010307>