freebsd-skq/sys/gnu/ext2fs
Bosko Milekic 9ed346bab0 Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:

mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)

similarily, for releasing a lock, we now have:

mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
We change the caller interface for the two different types of locks
because the semantics are entirely different for each case, and this
makes it explicitly clear and, at the same time, it rids us of the
extra `type' argument.

The enter->lock and exit->unlock change has been made with the idea
that we're "locking data" and not "entering locked code" in mind.

Further, remove all additional "flags" previously passed to the
lock acquire/release routines with the exception of two:

MTX_QUIET and MTX_NOSWITCH

The functionality of these flags is preserved and they can be passed
to the lock/unlock routines by calling the corresponding wrappers:

mtx_{lock, unlock}_flags(lock, flag(s)) and
mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
locks, respectively.

Re-inline some lock acq/rel code; in the sleep lock case, we only
inline the _obtain_lock()s in order to ensure that the inlined code
fits into a cache line. In the spin lock case, we inline recursion and
actually only perform a function call if we need to spin. This change
has been made with the idea that we generally tend to avoid spin locks
and that also the spin locks that we do have and are heavily used
(i.e. sched_lock) do recurse, and therefore in an effort to reduce
function call overhead for some architectures (such as alpha), we
inline recursion for this case.

Create a new malloc type for the witness code and retire from using
the M_DEV type. The new type is called M_WITNESS and is only declared
if WITNESS is enabled.

Begin cleaning up some machdep/mutex.h code - specifically updated the
"optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
need those.

Finally, caught up to the interface changes in all sys code.

Contributors: jake, jhb, jasone (in no particular order)
2001-02-09 06:11:45 +00:00
..
alpha-bitops.h Put the bits in place for Alpha support for ext2. Not tested. 2000-12-09 22:32:49 +00:00
COPYRIGHT.INFO Updated/corrected the list of GPL'ed files. 2000-01-01 11:27:50 +00:00
ext2_alloc.c ext2fs relies on UFS support code, and as a result also requires 2000-04-15 17:14:22 +00:00
ext2_balloc.c Backed out previous commit. Don't depend on namespace pollution in 2000-12-02 12:03:58 +00:00
ext2_bmap.c This patch corrects the first round of panics and hangs reported 2000-07-24 05:28:33 +00:00
ext2_extern.h Support filesystems with the not-so-new "sparse_superblocks" feature. 2000-11-03 16:41:48 +00:00
ext2_fs_sb.h Import the Linux ext2fs files that our GPL'ed ext2fs files seem to be 2000-01-01 11:05:19 +00:00
ext2_fs.h Support filesystems with the not-so-new "sparse_superblocks" feature. 2000-11-03 16:41:48 +00:00
ext2_ihash.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
ext2_inode_cnv.c Merged changes in ext2_fs.h between Linux 1.2.2 and Linux 2.3.35. The 2000-01-01 17:39:21 +00:00
ext2_inode.c Fix typo (accessable --> accessible). 2000-06-14 17:53:40 +00:00
ext2_linux_balloc.c Put the bits in place for Alpha support for ext2. Not tested. 2000-12-09 22:32:49 +00:00
ext2_linux_ialloc.c Put the bits in place for Alpha support for ext2. Not tested. 2000-12-09 22:32:49 +00:00
ext2_lookup.c Convert all users of fldoff() to offsetof(). fldoff() is bad 2000-10-27 11:45:49 +00:00
ext2_mount.h Introduce extended attribute support for FFS, allowing arbitrary 2000-04-15 03:34:27 +00:00
ext2_readwrite.c Proc locking, mostly protecting p_ucred while obtaining additional 2001-01-23 22:41:15 +00:00
ext2_subr.c Correct to a common %ld the 5 argument to a printf. 2000-12-09 22:32:01 +00:00
ext2_vfsops.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
ext2_vnops.c Fixed breakage of mknod() in rev.1.48 of ext2_vnops.c and rev.1.126 of 2000-11-04 08:10:56 +00:00
fs.h Quick fix for not writing group descriptor group, inode bitmaps or 2000-11-10 14:54:15 +00:00
i386-bitops.h Fix __asm__ clobber list abuse. 1999-11-15 23:16:06 +00:00
inode.h Add a lock structure to vnode structure. Previously it was either allocated 2000-09-25 15:24:04 +00:00