svn commit: r357907 - in head/sys: kern sys
Mateusz Guzik
mjg at FreeBSD.org
Fri Feb 14 11:21:29 UTC 2020
Author: mjg
Date: Fri Feb 14 11:21:28 2020
New Revision: 357907
URL: https://svnweb.freebsd.org/changeset/base/357907
Log:
lockmgr: rename lock_fast_path to lock_flags
The routine is not much of a fast path and the flags name better describes
its purpose.
Modified:
head/sys/kern/kern_lock.c
head/sys/kern/vfs_default.c
head/sys/sys/lockmgr.h
Modified: head/sys/kern/kern_lock.c
==============================================================================
--- head/sys/kern/kern_lock.c Fri Feb 14 11:20:25 2020 (r357906)
+++ head/sys/kern/kern_lock.c Fri Feb 14 11:21:28 2020 (r357907)
@@ -934,7 +934,7 @@ out:
}
int
-lockmgr_lock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk,
+lockmgr_lock_flags(struct lock *lk, u_int flags, struct lock_object *ilk,
const char *file, int line)
{
struct lock_class *class;
@@ -1123,7 +1123,7 @@ out:
* 2. returning with an error after sleep
* 3. unlocking the interlock
*
- * If in doubt, use lockmgr_*_fast_path.
+ * If in doubt, use lockmgr_lock_flags.
*/
int
lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line)
Modified: head/sys/kern/vfs_default.c
==============================================================================
--- head/sys/kern/vfs_default.c Fri Feb 14 11:20:25 2020 (r357906)
+++ head/sys/kern/vfs_default.c Fri Feb 14 11:21:28 2020 (r357907)
@@ -513,7 +513,7 @@ vop_stdlock(ap)
struct mtx *ilk;
ilk = VI_MTX(vp);
- return (lockmgr_lock_fast_path(vp->v_vnlock, ap->a_flags,
+ return (lockmgr_lock_flags(vp->v_vnlock, ap->a_flags,
&ilk->lock_object, ap->a_file, ap->a_line));
}
Modified: head/sys/sys/lockmgr.h
==============================================================================
--- head/sys/sys/lockmgr.h Fri Feb 14 11:20:25 2020 (r357906)
+++ head/sys/sys/lockmgr.h Fri Feb 14 11:21:28 2020 (r357907)
@@ -70,7 +70,7 @@ struct thread;
*/
int __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk,
const char *wmesg, int prio, int timo, const char *file, int line);
-int lockmgr_lock_fast_path(struct lock *lk, u_int flags,
+int lockmgr_lock_flags(struct lock *lk, u_int flags,
struct lock_object *ilk, const char *file, int line);
int lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line);
int lockmgr_xlock(struct lock *lk, u_int flags, const char *file, int line);
More information about the svn-src-head
mailing list