Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Feb 2001 17:00:03 +0600 (ALMT)
From:      Boris Popov <bp@butya.kz>
To:        freebsd-arch@freebsd.org
Cc:        freebsd-fs@freebsd.org
Subject:   vnode interlock API
Message-ID:  <Pine.BSF.4.21.0102061638280.82511-100000@lion.butya.kz>

next in thread | raw e-mail | index | archive | help
	Hello,

	Few months ago simple locks used for vnode interlock were replaced
by mutexes. It causes additional pain for externally maintained
filesystems and lowers portability of the code between -stable and
-current.

	So, I suggest to introduce two macro definitions which will hide
implementation details for interlocks:

#define VI_LOCK(vp)		mtx_enter(&(vp)->v_interlock, MTX_DEF)
#define VI_UNLOCK(vp)		mtx_exit(&(vp)->v_interlock, MTX_DEF)

	for RELENG_4 they will look like this:

#define VI_LOCK(vp)		simple_lock(&(vp)->v_interlock)
#define VI_UNLOCK(vp)		simple_unlock(&(vp)->v_interlock)

	Any comments, suggestions ?

--
Boris Popov
http://www.butya.kz/~bp/



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0102061638280.82511-100000>