Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, May 14, 2004 at 01:46:11PM -0400, David E. Cross wrote:
+> Ok... It was brought to my attention that someone was asking for this
+> again, so I figure its time to put out an update on the status.

Great to hear!

+> Here's what I want to do:
+> VOP/VFS entry point {
+> Aquire Mutex with RECURSION;


+> If first aquire, inc transaction ID; else don't;

if (!mtx_recursed(your_mtx))
/* Inc transaction ID. */;

+> NORMAL VOP/VFS Dispatch;
+> Release Mutex;

recursed =3D mtx_recursed(your_mtx);

+> if last release && syn_journal Checkpoint_Routine;

if (!recursed && syn_journal)

+> }

+> Checkpoint_Routine {
+> Aquire mutex with RECURSION:
+> if first aquire, last_tid=3DTID;
+> else last_tid=3DTID-1;
+> Dump_to last_tid;
+> Release mutex;
+> }
+> I am not sure how to check if we already have a mutex, and if its
+> recursion or not vs. the mutex is already aquired but its not "ours".
+> suggestions?

I'm not sure why you want to check if mutex is already acquired.
You don't want to sleep? You can use mtx_trylock(9) or mtx_owned(9) maybe.

Pawel Jakub Dawidek http://www.FreeBSD.org
pjd@FreeBSD.org http://garage.freebsd.pl
FreeBSD committer Am I Evil? Yes, I Am!

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFArimqForvXbEpPzQRAiGwAKCuE22rNNWQmv3S43rnZh qz29D/bACeNxZq